/**
 * IA Fame - Estilos públicos
 * Diseño oscuro con efecto glassmorphism
 */

/* Variables CSS - Tema oscuro */
:root {
    --iafame-primary: #a855f7;
    --iafame-primary-hover: #9333ea;
    --iafame-primary-glow: rgba(168, 85, 247, 0.4);
    --iafame-secondary: #94a3b8;
    --iafame-success: #22c55e;
    --iafame-error: #ef4444;
    --iafame-warning: #f59e0b;
    --iafame-bg: rgba(15, 23, 42, 0.6);
    --iafame-card-bg: rgba(30, 41, 59, 0.7);
    --iafame-glass-bg: rgba(255, 255, 255, 0.05);
    --iafame-glass-border: rgba(255, 255, 255, 0.1);
    --iafame-border: rgba(255, 255, 255, 0.1);
    --iafame-text: #f1f5f9;
    --iafame-text-muted: #94a3b8;
    --iafame-radius: 16px;
    --iafame-radius-sm: 10px;
    --iafame-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --iafame-shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --iafame-blur: blur(16px);
}

/* Contenedor principal - Glassmorphism */
.iafame-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 28px;
    background: var(--iafame-card-bg);
    backdrop-filter: var(--iafame-blur);
    -webkit-backdrop-filter: var(--iafame-blur);
    border-radius: var(--iafame-radius);
    border: 1px solid var(--iafame-glass-border);
    box-shadow: var(--iafame-shadow);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--iafame-text);
    overflow: visible;
    z-index: 1;
}

/* Imagen del famoso */
.iafame-celebrity-image {
    text-align: center;
    margin-bottom: 24px;
}

.iafame-celebrity-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--iafame-radius);
    box-shadow: var(--iafame-shadow);
    object-fit: contain;
    border: 1px solid var(--iafame-glass-border);
}

.iafame-celebrity-name {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--iafame-text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Selector de acciones */
.iafame-actions h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--iafame-text);
    text-align: center;
}

.iafame-action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.iafame-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--iafame-glass-bg);
    border: 1px solid var(--iafame-glass-border);
    border-radius: var(--iafame-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.iafame-action-btn:hover {
    border-color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--iafame-primary-glow);
}

.iafame-action-btn.active {
    border-color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 20px var(--iafame-primary-glow);
}

.iafame-action-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.iafame-action-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--iafame-text);
    text-align: center;
}

/* Panel de opciones */
.iafame-options-panel {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--iafame-glass-border);
    position: relative;
    overflow: visible;
}

.iafame-option-section h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--iafame-text);
}

/* Textarea de prompt - IMPORTANTE: texto visible */
.iafame-prompt-input {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--iafame-glass-border);
    border-radius: var(--iafame-radius-sm);
    font-size: 14px;
    line-height: 1.6;
    color: var(--iafame-text);
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.iafame-prompt-input::placeholder {
    color: var(--iafame-text-muted);
    opacity: 0.7;
}

.iafame-prompt-input:focus {
    outline: none;
    border-color: var(--iafame-primary);
    box-shadow: 0 0 15px var(--iafame-primary-glow);
    background: rgba(0, 0, 0, 0.4);
}

.iafame-char-count {
    text-align: right;
    font-size: 12px;
    color: var(--iafame-text-muted);
    margin-top: 6px;
}

/* Quick prompts */
.iafame-quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 20px;
}

.iafame-quick-prompt {
    padding: 8px 14px;
    background: var(--iafame-glass-bg);
    border: 1px solid var(--iafame-glass-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--iafame-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.iafame-quick-prompt:hover {
    background: var(--iafame-primary);
    border-color: var(--iafame-primary);
    color: white;
    box-shadow: 0 4px 15px var(--iafame-primary-glow);
}

/* Zona de upload */
.iafame-upload-zone {
    margin-bottom: 20px;
}

.iafame-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 36px 20px;
    border: 2px dashed var(--iafame-glass-border);
    border-radius: var(--iafame-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--iafame-glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.iafame-upload-label:hover {
    border-color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.1);
    box-shadow: 0 0 20px var(--iafame-primary-glow);
}

.iafame-upload-label.dragover {
    border-color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.15);
    box-shadow: 0 0 30px var(--iafame-primary-glow);
}

.iafame-upload-icon {
    font-size: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.iafame-upload-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--iafame-text);
}

.iafame-upload-hint {
    font-size: 12px;
    color: var(--iafame-text-muted);
}

/* Preview de upload */
.iafame-upload-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.iafame-upload-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--iafame-radius-sm);
    box-shadow: var(--iafame-shadow);
    border: 1px solid var(--iafame-glass-border);
}

.iafame-remove-upload {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background: var(--iafame-error);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.iafame-remove-upload:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

/* Opciones de integracion */
.iafame-integration-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.iafame-radio-option {
    display: flex;
    align-items: center;
    padding: 14px;
    background: var(--iafame-glass-bg);
    border: 1px solid var(--iafame-glass-border);
    border-radius: var(--iafame-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.iafame-radio-option:hover {
    border-color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.1);
}

.iafame-radio-option input {
    margin-right: 12px;
    accent-color: var(--iafame-primary);
    width: 18px;
    height: 18px;
}

.iafame-radio-option input:checked + .iafame-radio-label {
    color: var(--iafame-primary);
    font-weight: 500;
}

.iafame-radio-label {
    font-size: 14px;
    color: var(--iafame-text);
}

/* Info text */
.iafame-info-text {
    margin: 16px 0;
    padding: 14px 16px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--iafame-radius-sm);
    font-size: 13px;
    color: #93c5fd;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Presets de video */
.iafame-video-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.iafame-preset-btn {
    padding: 10px 18px;
    background: var(--iafame-glass-bg);
    border: 1px solid var(--iafame-glass-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--iafame-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.iafame-preset-btn:hover,
.iafame-preset-btn.active {
    background: var(--iafame-primary);
    border-color: var(--iafame-primary);
    color: white;
    box-shadow: 0 4px 15px var(--iafame-primary-glow);
}

/* Botones de accion */
.iafame-submit-section {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--iafame-glass-border);
}

.iafame-submit-btn {
    flex: 1;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--iafame-primary), #7c3aed);
    border: none;
    border-radius: var(--iafame-radius-sm);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--iafame-primary-glow);
}

.iafame-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--iafame-primary-hover), #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--iafame-primary-glow);
}

.iafame-submit-btn:disabled {
    background: rgba(148, 163, 184, 0.3);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.iafame-back-btn {
    padding: 16px 20px;
    background: var(--iafame-glass-bg);
    border: 1px solid var(--iafame-glass-border);
    border-radius: var(--iafame-radius-sm);
    color: var(--iafame-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.iafame-back-btn:hover {
    border-color: var(--iafame-text-muted);
    background: rgba(255, 255, 255, 0.1);
}

/* Spinner */
.iafame-spinner,
.iafame-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: iafame-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.iafame-loading-spinner {
    width: 52px;
    height: 52px;
    border-width: 4px;
    border-color: rgba(168, 85, 247, 0.2);
    border-top-color: var(--iafame-primary);
}

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

/* Loading overlay */
.iafame-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--iafame-radius);
    z-index: 100;
}

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

.iafame-loading-text {
    margin-top: 20px;
    font-size: 17px;
    font-weight: 600;
    color: var(--iafame-text);
}

.iafame-loading-subtext {
    margin-top: 6px;
    font-size: 13px;
    color: var(--iafame-text-muted);
}

/* Resultado */
.iafame-result {
    text-align: center;
}

.iafame-result h3 {
    margin: 0 0 20px;
    font-size: 22px;
    color: var(--iafame-success);
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.iafame-result-content {
    margin-bottom: 24px;
}

.iafame-result-image img,
.iafame-result-video video {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--iafame-radius);
    box-shadow: var(--iafame-shadow-lg);
    border: 1px solid var(--iafame-glass-border);
}

/* Provider badge - Indicador de proveedor */
.iafame-provider-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--iafame-primary);
    text-align: center;
}

/* AI Message - Nuevo */
.iafame-ai-message {
    margin: 20px 0;
    padding: 16px 20px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--iafame-radius-sm);
    text-align: left;
}

.iafame-ai-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--iafame-primary);
    font-size: 13px;
}

.iafame-ai-message-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--iafame-text);
}

.iafame-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.iafame-download-btn,
.iafame-share-btn,
.iafame-new-btn {
    padding: 14px 26px;
    border-radius: var(--iafame-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.iafame-download-btn {
    background: linear-gradient(135deg, var(--iafame-success), #16a34a);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.iafame-download-btn:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    color: white;
}

.iafame-share-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.iafame-share-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.iafame-new-btn {
    background: var(--iafame-glass-bg);
    border: 1px solid var(--iafame-glass-border);
    color: var(--iafame-text);
}

.iafame-new-btn:hover {
    border-color: var(--iafame-primary);
    color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.1);
}

/* Mensajes de error */
.iafame-error,
.iafame-error-message {
    padding: 16px 20px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--iafame-radius-sm);
    color: #fca5a5;
    font-size: 14px;
    margin-top: 16px;
}

.iafame-error a {
    color: #fca5a5;
    font-weight: 600;
    text-decoration: underline;
}

.iafame-error a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 480px) {
    .iafame-container {
        padding: 20px;
        margin: 0 10px;
        border-radius: var(--iafame-radius-sm);
    }

    .iafame-action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .iafame-action-btn {
        padding: 14px 10px;
    }

    .iafame-action-icon {
        font-size: 24px;
    }

    .iafame-action-text {
        font-size: 12px;
    }

    .iafame-submit-section {
        flex-direction: column;
    }

    .iafame-result-actions {
        flex-direction: column;
    }

    .iafame-download-btn,
    .iafame-share-btn,
    .iafame-new-btn {
        width: 100%;
        text-align: center;
    }
}

/* Animaciones */
.iafame-fade-in {
    animation: iafame-fadeIn 0.4s ease;
}

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

/* Custom integration textarea */
.iafame-custom-integration {
    margin-top: 12px;
}

.iafame-custom-integration .iafame-prompt-input {
    min-height: 80px;
}

/* Glow effect for focused elements */
.iafame-action-btn:focus,
.iafame-submit-btn:focus,
.iafame-back-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--iafame-primary-glow);
}

/* =====================================================
   SELECTOR DE MODO (Preset vs Custom)
   ===================================================== */
.iafame-mode-selector {
    margin-bottom: 24px;
}

.iafame-mode-selector h3 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--iafame-text-muted);
    text-align: center;
}

.iafame-mode-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.iafame-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--iafame-glass-bg);
    border: 1px solid var(--iafame-glass-border);
    border-radius: var(--iafame-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.iafame-mode-btn:hover {
    border-color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.1);
    transform: translateY(-2px);
}

.iafame-mode-btn.active {
    border-color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 20px var(--iafame-primary-glow);
}

.iafame-mode-btn strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--iafame-text);
}

.iafame-mode-btn span {
    font-size: 12px;
    color: var(--iafame-text-muted);
    text-align: center;
}

/* =====================================================
   CONTENIDO POR MODO
   ===================================================== */
.iafame-mode-content {
    padding-top: 8px;
    position: relative;
    overflow: visible;
}

.iafame-mode-content h4 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--iafame-text);
}

/* =====================================================
   SELECTOR DE PROMPTS CON BÚSQUEDA
   ===================================================== */
.iafame-prompt-selector {
    position: relative;
    margin-bottom: 20px;
    z-index: 50;
}

.iafame-select-wrapper {
    position: relative;
    z-index: 50;
}

.iafame-search-input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--iafame-glass-border);
    border-radius: var(--iafame-radius-sm);
    font-size: 14px;
    color: var(--iafame-text);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.iafame-search-input::placeholder {
    color: var(--iafame-text-muted);
    opacity: 0.8;
}

.iafame-search-input:focus {
    outline: none;
    border-color: var(--iafame-primary);
    box-shadow: 0 0 15px var(--iafame-primary-glow);
    background: rgba(0, 0, 0, 0.4);
}

.iafame-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--iafame-text-muted);
    pointer-events: none;
    font-size: 14px;
}

/* Dropdown de prompts */
.iafame-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(20, 30, 48, 0.98);
    border: 1px solid var(--iafame-glass-border);
    border-top: none;
    border-radius: 0 0 var(--iafame-radius-sm) var(--iafame-radius-sm);
    z-index: 60;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.iafame-dropdown.open {
    max-height: 320px;
    overflow-y: auto;
    opacity: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Scroll personalizado */
.iafame-dropdown::-webkit-scrollbar {
    width: 6px;
}

.iafame-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.iafame-dropdown::-webkit-scrollbar-thumb {
    background: var(--iafame-primary);
    border-radius: 3px;
}

/* Categoría en dropdown */
.iafame-dropdown-category {
    border-bottom: 1px solid var(--iafame-glass-border);
}

.iafame-dropdown-category:last-child {
    border-bottom: none;
}

.iafame-category-header {
    padding: 12px 16px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.08);
}

/* Item de prompt */
.iafame-dropdown-item {
    padding: 12px 16px 12px 24px;
    font-size: 14px;
    color: var(--iafame-text);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.iafame-dropdown-item:hover {
    background: rgba(168, 85, 247, 0.15);
    border-left-color: var(--iafame-primary);
    color: white;
}

/* Prompt seleccionado */
.iafame-selected-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid var(--iafame-primary);
    border-radius: var(--iafame-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.iafame-selected-prompt:hover {
    background: rgba(168, 85, 247, 0.2);
}

.iafame-selected-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.iafame-selected-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--iafame-primary);
    white-space: nowrap;
}

.iafame-selected-name {
    font-size: 14px;
    color: var(--iafame-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iafame-clear-selection {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    color: #fca5a5;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
    padding: 0;
}

.iafame-clear-selection:hover {
    background: var(--iafame-error);
    color: white;
    transform: scale(1.1);
}

/* =====================================================
   SECCIÓN DE UPLOAD CONDICIONAL
   ===================================================== */
#iafame-upload-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--iafame-glass-border);
}

#iafame-upload-section h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--iafame-text);
}

/* =====================================================
   MODO CUSTOM - TOGGLE FOTO
   ===================================================== */
.iafame-custom-upload-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--iafame-glass-bg);
    border: 1px solid var(--iafame-glass-border);
    border-radius: var(--iafame-radius-sm);
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.iafame-custom-upload-toggle:hover {
    border-color: var(--iafame-primary);
    background: rgba(168, 85, 247, 0.08);
}

.iafame-custom-upload-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--iafame-primary);
    cursor: pointer;
}

.iafame-custom-upload-toggle span {
    font-size: 14px;
    color: var(--iafame-text);
}

.iafame-custom-upload-zone {
    margin-top: 12px;
}

/* =====================================================
   RESPONSIVE PARA NUEVOS ELEMENTOS
   ===================================================== */
@media (max-width: 480px) {
    .iafame-mode-buttons {
        grid-template-columns: 1fr;
    }

    .iafame-mode-btn {
        padding: 16px 14px;
    }

    .iafame-dropdown.open {
        max-height: 260px;
    }

    .iafame-selected-prompt {
        padding: 12px 14px;
    }

    .iafame-selected-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .iafame-selected-category {
        font-size: 10px;
    }

    .iafame-selected-name {
        font-size: 13px;
    }
}
