/* Outer Suite Container (Matches existing layout and design system) */
.jq-gif-container {
    background: linear-gradient(135deg, #1a1a24 0%, #4d5667 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 48px;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #fff;
    box-sizing: border-box;
}

.jq-gif-container * {
    box-sizing: border-box;
}

/* Top Section layout */
.jq-gif-top {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
}

/* Left Column Info Styles */
.jq-gif-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.jq-gif-title {
    font-size: 32px !important;
    font-weight: 500 !important;
    margin: 0 0 16px 0 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px;
}

.jq-gif-intro {
    font-size: 15px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0 0 20px 0 !important;
    line-height: 1.6 !important;
}

/* Checklist Features list */
.jq-gif-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.jq-gif-features li {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
}

.jq-gif-features li:last-child {
    margin-bottom: 0;
}

.jq-gif-features svg {
    flex-shrink: 0;
    margin-right: 12px;
}

/* Large Drag & Drop Upload Zone */
.jq-gif-dropzone {
    background: #1a1a24;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, transform 0.1s;
    position: relative;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jq-gif-dropzone:hover {
    border-color: #b2ffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.jq-gif-dropzone.dragover {
    border-color: #b2ffff;
    background-color: rgba(178, 255, 255, 0.1);
    transform: scale(1.01);
}

.jq-gif-hidden-input {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
}

.jq-gif-upload-icon {
    color: #b2ffff;
    margin-bottom: 16px;
    transition: transform 0.2s;
}

.jq-gif-dropzone:hover .jq-gif-upload-icon {
    transform: translateY(-4px);
}

.jq-gif-upload-text {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.jq-gif-highlight {
    color: #b2ffff;
    text-decoration: underline;
    font-weight: 600;
}

.jq-gif-upload-subtext {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 8px 0;
}

.jq-gif-privacy-note {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

/* Section Options Box */
.jq-gif-section {
    background: #1a1a24;
    padding: 24px;
    border-radius: 12px;
    border: none;
    margin-bottom: 24px;
}

.jq-gif-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.jq-gif-section-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #b2ffff !important;
    letter-spacing: 0.5px;
}
.jq-gif-section > .jq-gif-section-title {
    margin-bottom: 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.jq-gif-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.jq-gif-grid-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.jq-gif-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jq-gif-field-group label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jq-gif-field-helper {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* Styled Dropdowns/Selects */
.jq-gif-select, .jq-gif-color-input {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 14px;
    color: #ffffff !important;
    font-size: 14px;
    outline: none;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 44px;
}

.jq-gif-color-input {
    padding: 0;
    overflow: hidden;
}
.jq-gif-color-input::-webkit-color-swatch-wrapper {
	padding: 0;
}
.jq-gif-color-input::-webkit-color-swatch {
	border: none;
}

.jq-gif-select:focus {
    border-color: #b2ffff;
    box-shadow: 0 0 0 3px rgba(178, 255, 255, 0.15);
}

.jq-gif-select option {
    background-color: #1a1a24;
    color: #fff;
}

/* Range input container */
.jq-gif-range-container {
    display: flex;
    align-items: center;
    height: 44px;
}

.jq-gif-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    border: none;
}

.jq-gif-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #b2ffff;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    border: none;
}

.jq-gif-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #ffffff;
}

.jq-gif-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: #b2ffff;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
}

.jq-gif-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: #ffffff;
}

/* Middle Section */
.jq-gif-middle {
    background: #1a1a24;
    padding: 24px;
    border-radius: 12px;
    width: 100%;
}

.jq-gif-subtext {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.jq-gif-sortable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

/* Sortable Image Cards */
.jq-gif-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: grab;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.jq-gif-card:hover {
    border-color: rgba(178, 255, 255, 0.4);
}

.jq-gif-card:active {
    cursor: grabbing;
}

.jq-gif-card.sortable-ghost {
    opacity: 0.4;
    background-color: rgba(178, 255, 255, 0.1);
}

.jq-gif-card-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    pointer-events: none;
}

.jq-gif-card-info {
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.jq-gif-card-index {
    font-size: 11px;
    font-weight: 600;
    color: #b2ffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.jq-gif-card-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.jq-gif-card-remove:hover {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
}

/* Bottom Section */
.jq-gif-bottom {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.jq-gif-preview-container {
    background: #1a1a24;
    padding: 24px;
    border-radius: 12px;
}

.jq-gif-preview-wrapper {
    background: repeating-conic-gradient(rgba(255, 255, 255, 0.05) 0% 25%, transparent 0% 50%) 50% / 20px 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
}

.jq-gif-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 36, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.jq-gif-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(178, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #b2ffff;
    animation: jq-spin 1s ease-in-out infinite;
    margin-bottom: 12px;
}

@keyframes jq-spin {
    to { transform: rotate(360deg); }
}

.jq-gif-loading-text {
    font-size: 14px;
    color: #b2ffff;
    font-weight: 500;
}

/* Buttons style */
.jq-gif-btn {
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
}

.jq-gif-btn:active {
    transform: translateY(0);
}

.jq-btn-icon {
    flex-shrink: 0;
}

.jq-gif-btn--primary {
    background-color: #fff;
    color: #1a1a24;
    padding: 16px 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
}

.jq-gif-btn--primary:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.jq-gif-btn--download {
    background-color: #b2ffff;
    color: #1a1a24;
    padding: 16px 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
}

.jq-gif-btn--download:hover:not(:disabled) {
    background-color: #6eb7b5;
}

.jq-gif-btn:disabled {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.jq-gif-btn--secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    padding: 8px 16px;
}
.jq-gif-btn--secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.jq-gif-btn--danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    font-size: 13px;
    padding: 8px 16px;
}
.jq-gif-btn--danger:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

.jq-gif-editor-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.jq-gif-order-actions {
    display: flex;
    gap: 8px;
}

/* Success and Error Message Box */
.jq-gif-message-wrapper {
    margin-top: 10px;
    margin-bottom: 10px;
}

.jq-gif-message {
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.jq-gif-message--error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.jq-gif-message--success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Responsive Rules */
@media (max-width: 992px) {
    .jq-gif-top {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .jq-gif-container {
        padding: 32px 24px;
        gap: 32px;
    }
    
    .jq-gif-sortable-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 576px) {
    .jq-gif-editor-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .jq-gif-btn--primary, .jq-gif-btn--download {
        padding: 14px 20px;
        width: 100%;
    }
}
