/* AI Custom Image Frontend Styles */
.aici-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
}

.aici-container * {
    box-sizing: border-box;
}

/* Utility class for transparent styling */
.aici-container.transparent {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.aici-header {
    text-align: center;
    margin-bottom: 32px;
}

.aici-header h3 {
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aici-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
    font-weight: 400;
}

/* Progress Bar */
.aici-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 0 auto 40px;
    max-width: 600px;
}

.aici-progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e1e5e9 0%, #f8f9fa 100%);
    z-index: 1;
    transform: translateY(-50%);
    border-radius: 2px;
}

.aici-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 0 12px;
    transition: all 0.3s ease;
}

.aici-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.aici-step-label {
    font-size: 13px;
    color: #666;
    text-align: center;
    white-space: nowrap;
    font-weight: 600;
}

.aici-progress-step.aici-step-active .aici-step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: scale(1.1);
}

.aici-progress-step.aici-step-completed .aici-step-number {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: #fff;
}

/* Steps */
.aici-steps {
    position: relative;
    min-height: 500px;
}

.aici-step {
    display: none;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s ease;
}

.aici-step.aici-step-visible {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.aici-step-content h4 {
    margin: 0 0 24px 0;
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

/* Upload Area */
.aici-upload-area {
    border: 3px dashed #bdc3c7;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aici-upload-area:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.aici-upload-area.aici-dragover {
    border-color: #56ab2f;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e8 100%);
    transform: scale(1.02);
}

.aici-upload-icon svg {
    color: #bdc3c7;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.aici-upload-area:hover .aici-upload-icon svg {
    color: #667eea;
    transform: scale(1.1);
}

.aici-upload-text {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.aici-upload-note {
    font-size: 13px !important;
    color: #666 !important;
    margin: 0 !important;
}

.aici-upload-preview {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.aici-upload-preview img {
    max-width: 400px;
    max-height: 300px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.aici-upload-preview:hover img {
    transform: scale(1.02);
}

.aici-remove-image {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff416c 0%, #ff4757 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.3);
    transition: all 0.3s ease;
}

.aici-remove-image:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 65, 108, 0.4);
}

/* Style Categories */
.aici-style-categories {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.aici-category-btn {
    margin: 0px;
    padding: 3px 6px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: #fff;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.aici-category-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.aici-category-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Style Selection */
.aici-styles-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, 160px);
    gap: 16px;
    margin-bottom: 32px;
    align-items: start;
    justify-content: space-evenly;
    width: 100%;
}

.aici-styles-grid.active {
    display: grid;
}

.aici-style-option {
    cursor: pointer;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
    display: flex;
    flex-direction: column;
    width: 160px;
    height: 200px;
}

.aici-style-option:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.15);
}

.aici-style-option.aici-selected {
    border-color: #56ab2f;
    box-shadow: 0 0 0 3px rgba(86, 171, 47, 0.2);
    transform: translateY(-4px);
}

.aici-container .aici-style-image {
    position: relative !important;
    width: 100% !important;
    height: 140px !important;
    overflow: hidden !important;
    background: #f8f9fa !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.aici-container .aici-style-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: all 0.3s ease !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: none !important;
    max-height: none !important;
}

.aici-style-option:hover .aici-style-image img {
    transform: scale(1.05);
}

.aici-style-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(86, 171, 47, 0.9) 0%, rgba(168, 230, 207, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.aici-style-option.aici-selected .aici-style-overlay {
    opacity: 1;
}

.aici-style-check {
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    animation: aiciPulse 0.6s ease;
}

@keyframes aiciPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.aici-style-info {
    padding: 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 50px;
    text-align: center;
}

.aici-style-info h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.aici-style-info p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.aici-style-cost {
    margin: 8px 0 0 0 !important;
    font-size: 12px !important;
    color: #667eea !important;
    font-weight: 500 !important;
}

.aici-generation-time {
    color: #999 !important;
    font-style: italic !important;
}

/* Processing */
.aici-processing {
    text-align: center;
    padding: 48px 24px;
}

.aici-processing-animation {
    margin-bottom: 32px;
}

.aici-spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    position: relative;
}

.aici-spinner-inner {
    width: 100%;
    height: 100%;
    border: 4px solid #e1e5e9;
    border-top: 4px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
    border-radius: 50%;
    animation: aiciSpin 1.2s linear infinite;
}

@keyframes aiciSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.aici-processing-text {
    font-size: 18px;
    color: #666;
    margin: 0 0 32px 0;
    font-weight: 600;
}

.aici-progress-container {
    max-width: 400px;
    margin: 0 auto 32px;
}

.aici-progress-track {
    width: 100%;
    height: 12px;
    background: #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.aici-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    border-radius: 6px;
}

.aici-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aici-progress-percentage {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.aici-progress-eta {
    font-size: 14px;
    color: #666;
}

.aici-processing-tips {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
}

.aici-processing-tips h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
}

.aici-processing-tips ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.aici-processing-tips li {
    padding: 8px 0;
    color: #666;
    position: relative;
    padding-left: 24px;
}

.aici-processing-tips li::before {
    content: '💡';
    position: absolute;
    left: 0;
    top: 8px;
}

/* Generated Options */
.aici-generated-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.aici-choice-option {
    border: 3px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.aici-choice-option:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.15);
}

.aici-choice-option.aici-selected {
    border-color: #56ab2f;
    box-shadow: 0 0 0 3px rgba(86, 171, 47, 0.2);
    transform: translateY(-4px);
}

.aici-choice-image {
    position: relative;
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1;
    overflow: hidden;
    padding-top: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 0 auto;
}

.aici-choice-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    transition: all 0.3s ease;
}

.aici-choice-option:hover .aici-choice-image img {
    transform: scale(1.05);
}

.aici-choice-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(86, 171, 47, 0.9) 0%, rgba(168, 230, 207, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.aici-choice-option.aici-selected .aici-choice-overlay {
    opacity: 1;
    animation: aiciPulse 0.6s ease;
}

.aici-choice-label {
    padding: 16px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
}

/* Buttons */
.aici-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    gap: 16px;
}

.aici-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aici-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.aici-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.aici-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.aici-btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.aici-btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.4);
}

.aici-btn-add-to-cart {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: #fff;
    flex-grow: 1;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.3);
}

.aici-btn-add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(86, 171, 47, 0.4);
}

.aici-cart-icon {
    margin-right: 8px;
    font-size: 18px;
}

/* Success & Error Messages */
.aici-success, .aici-error {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    animation: aiciSlideIn 0.4s ease;
    max-width: 400px;
}

.aici-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: #fff;
}

.aici-error {
    background: linear-gradient(135deg, #ff416c 0%, #ff4757 100%);
    color: #fff;
}

@keyframes aiciSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.aici-success-content, .aici-error-content {
    /* Remove padding and flex for better layout */
}

.aici-success-icon, .aici-error-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.aici-success-message, .aici-error-message {
    flex-grow: 1;
    font-size: 16px;
    font-weight: 600;
}

.aici-error-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aici-error-close:hover {
    opacity: 0.8;
}

/* Success Panel (in-flow) */
#aici-success {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    max-width: none !important;
    animation: none !important;
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: #fff;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(86, 171, 47, 0.3);
    margin: 24px auto;
    max-width: 500px;
}

#aici-success .aici-success-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

#aici-success h4 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
}

.aici-success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
}

/* Loading Overlay */
.aici-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.aici-loading-content {
    text-align: center;
}

.aici-loading-content .aici-spinner {
    margin-bottom: 20px;
}

.aici-loading-content p {
    margin: 0;
    font-size: 16px;
    color: #666;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aici-container {
        padding: 20px;
        margin: 16px 0;
        border-radius: 8px;
    }

    .aici-header h3 {
        font-size: 24px;
    }

    .aici-header p {
        font-size: 14px;
    }

    .aici-progress-bar {
        max-width: 100%;
    }

    .aici-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .aici-step-label {
        font-size: 11px;
    }

    .aici-styles-grid {
        grid-template-columns: repeat(auto-fill, 160px);
        gap: 14px;
        justify-content: space-evenly;
        width: 100%;
    }

    .aici-style-option {
        width: 160px;
        height: 200px;
    }

    .aici-style-image {
        height: 140px;
    }

    .aici-generated-options {
        grid-template-columns: 1fr;
    }

    .aici-step-actions {
        flex-direction: column;
    }

    .aici-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 14px;
    }

    .aici-success, .aici-error {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }

    #aici-success {
        margin: 16px auto !important;
        padding: 24px !important;
        max-width: none !important;
    }

    .aici-upload-area {
        padding: 32px 16px;
        min-height: 180px;
    }

    .aici-upload-preview img {
        max-width: 100%;
        max-height: 200px;
    }

    .aici-processing {
        padding: 32px 16px;
    }

    .aici-processing-tips {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .aici-container {
        padding: 16px;
        margin: 8px 0;
    }

    .aici-header h3 {
        font-size: 20px;
    }

    .aici-upload-area {
        padding: 24px 12px;
        min-height: 140px;
    }

    .aici-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .aici-step-label {
        font-size: 10px;
    }

    .aici-category-btn {
        margin: 0px;
        padding: 3px 6px;
        font-size: 12px;
        border-radius: 10px;
    }

    .aici-styles-grid {
        grid-template-columns: repeat(auto-fill, 150px);
        gap: 12px;
        justify-content: space-evenly;
        width: 100%;
    }

    .aici-style-option {
        width: 150px;
        height: 190px;
    }

    .aici-style-image {
        height: 100px;
    }

    .aici-choice-image {
        aspect-ratio: 1;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .aici-container {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }

    .aici-header h3 {
        color: #ecf0f1;
    }

    .aici-upload-area {
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
        border-color: #4a5568;
    }

    .aici-upload-area:hover {
        background: linear-gradient(135deg, #4a5568 0%, #34495e 100%);
    }

    .aici-style-option, .aici-choice-option {
        background: #34495e;
        border-color: #4a5568;
    }

    .aici-processing-tips {
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
        border-color: #4a5568;
    }
}

/* Completion Message Box */
.aici-completion-message {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.aici-completion-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.aici-completion-text {
    flex-grow: 1;
}

.aici-completion-text h5 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #2E7D32;
}

.aici-completion-text p {
    margin: 0;
    font-size: 14px;
    color: #388E3C;
    line-height: 1.5;
}

/* Final Image Display in Success Panel */
.aici-final-image-container {
    text-align: center;
    margin-bottom: 24px;
}

.aici-final-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border: 3px solid #4CAF50;
}

/* Success Panel Layout */
.aici-success-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}
/* Colorization Modal Styles */
.aici-colorize-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.aici-colorize-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.aici-colorize-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    z-index: 1;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.aici-colorize-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e1e5e9;
}

.aici-colorize-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aici-colorize-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.aici-colorize-close:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.aici-colorize-body {
    padding: 32px 24px;
    text-align: center;
}

.aici-colorize-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #667eea;
}

.aici-colorize-icon svg {
    width: 100%;
    height: 100%;
}

.aici-colorize-message {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.aici-colorize-submessage {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.6;
}

.aici-colorize-actions {
    padding: 20px 24px 24px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.aici-colorize-actions .aici-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    text-decoration: none;
}

.aici-colorize-actions .aici-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.aici-colorize-actions .aici-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.aici-colorize-actions .aici-btn-primary:active {
    transform: translateY(0);
}

.aici-colorize-actions .aici-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #e1e5e9;
}

.aici-colorize-actions .aici-btn-secondary:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.aici-colorize-actions .aici-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aici-colorize-content {
        width: 95%;
        max-width: none;
        margin: 20px;
    }

    .aici-colorize-header {
        padding: 20px 16px 12px;
    }

    .aici-colorize-header h3 {
        font-size: 18px;
    }

    .aici-colorize-body {
        padding: 24px 16px;
    }

    .aici-colorize-actions {
        padding: 16px;
    }

    .aici-colorize-actions .aici-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Loading state for colorization */
.aici-colorizing .aici-loading-overlay {
    background: rgba(102, 126, 234, 0.95);
}

.aici-colorizing .aici-loading-text {
    color: #fff;
    font-weight: 600;
}

/* Single result layout (for FLUX and non-Midjourney providers) */
.aici-choice-option.aici-single-result {
    grid-column: 1 / -1;
    max-width: 600px;
    margin: 0 auto;
    cursor: default;
    border-color: #56ab2f;
    box-shadow: 0 8px 25px rgba(86, 171, 47, 0.15);
}

.aici-choice-option.aici-single-result:hover {
    transform: none;
}

.aici-choice-option.aici-single-result .aici-choice-image {
    max-width: 100%;
    aspect-ratio: auto;
}

.aici-choice-option.aici-single-result .aici-choice-image img {
    max-width: 100%;
    height: auto;
}

.aici-choice-option.aici-single-result .aici-choice-label {
    display: none;
}

.aici-choice-option.aici-single-result .aici-choice-overlay {
    display: none;
}

/* Skip Style Button */
.aici-btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.aici-btn-outline:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #556cd6;
    color: #556cd6;
}

.aici-btn-skip-style {
    flex: 1;
    max-width: 250px;
}
