/* ═══════════════════════════════════════════════════════════
   iex-publish-form.css — Formulario de Publicación 7 Pasos
   SaaS Inmobiliarie · Glassmorphism · Sprint 3
═══════════════════════════════════════════════════════════ */

/* ── LAYOUT BASE ── */
.iex-publish-page { padding-bottom: 80px; }

.iex-publish-hero {
    padding: 60px 0 40px; text-align: center;
    background: linear-gradient(180deg, rgba(212,175,55,0.05) 0%, transparent 100%);
}
.iex-publish-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 10px; }
.iex-publish-subtitle { font-size: 1.1rem; color: var(--iex-text-secondary); max-width: 600px; margin: 0 auto; }

.iex-publish-wrapper {
    max-width: 800px; margin: 0 auto;
    background: var(--iex-glass-bg, rgba(255,255,255,0.05));
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--iex-glass-border, rgba(255,255,255,0.1));
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

/* ── STEPPER (Barra de progreso) ── */
.iex-stepper {
    display: flex; justify-content: space-between;
    margin-bottom: 40px; position: relative;
}
.iex-stepper::before {
    content: ''; position: absolute;
    top: 15px; left: 0; right: 0; height: 2px;
    background: rgba(255,255,255,0.1); z-index: 0;
}
.iex-stepper .step {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    opacity: 0.5; transition: all 0.3s;
}
.iex-stepper .step span {
    width: 32px; height: 32px; border-radius: 50%;
    background: #1A202C; border: 2px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: 700; color: #fff;
    transition: all 0.3s;
}
.iex-stepper .step p { font-size: 0.75rem; font-weight: 600; margin: 0; text-transform: uppercase; letter-spacing: 0.5px; }

/* Estados del Stepper */
.iex-stepper .step.active { opacity: 1; }
.iex-stepper .step.active span {
    border-color: #D4AF37; background: rgba(212,175,55,0.2); color: #D4AF37;
    box-shadow: 0 0 15px rgba(212,175,55,0.3);
}
.iex-stepper .step.passed { opacity: 1; }
.iex-stepper .step.passed span {
    background: #D4AF37; border-color: #D4AF37; color: #0A0F1A;
}

/* ── PANELES DEL FORM ── */
.iex-step-panel { display: none; animation: iex-fadeSlide 0.3s ease; }
.iex-step-panel.active { display: block; }

@keyframes iex-fadeSlide {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.iex-step-panel h3 { font-size: 1.5rem; margin-bottom: 25px; color: var(--iex-text-primary); }

/* ── INPUTS Y GRUPOS ── */
.iex-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.iex-form-group { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.iex-form-group label { font-size: 0.85rem; font-weight: 600; color: var(--iex-text-secondary); text-transform: uppercase; }

.iex-input {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--iex-glass-border, rgba(255,255,255,0.1));
    border-radius: 10px; padding: 14px 16px;
    color: var(--iex-text-primary); font-size: 1rem; font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s; width: 100%;
}
.iex-input option {
    background-color: #1A202C; /* Dark background so white text shows, or contrast */
    color: #F8FAFC;
}
.iex-input:focus { outline: none; border-color: #D4AF37; box-shadow: 0 0 0 3px rgba(212,175,55,0.15); }
.iex-input.iex-input-lg { font-size: 1.5rem; font-weight: 700; padding: 18px 20px; color: #D4AF37; }

/* Radio Cards (Venta / Renta) */
.iex-radio-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 15px; }
.iex-radio-card {
    position: relative; cursor: pointer;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 15px; text-align: center;
    transition: all 0.2s;
}
.iex-radio-card input { position: absolute; opacity: 0; }
.iex-radio-card span { font-weight: 600; color: var(--iex-text-secondary); }
.iex-radio-card input:checked + span { color: #0A0F1A; }
.iex-radio-card:has(input:checked) { background: #D4AF37; border-color: #D4AF37; transform: translateY(-2px); box-shadow: 0 8px 15px rgba(212,175,55,0.2); }

/* ── DRAG & DROP FOTOS ── */
.iex-file-upload-area {
    border: 2px dashed rgba(255,255,255,0.2); border-radius: 16px;
    padding: 40px; text-align: center; cursor: pointer;
    background: rgba(255,255,255,0.02); transition: all 0.3s;
    position: relative; overflow: hidden;
}
.iex-file-upload-area:hover, .iex-file-upload-area.dragover {
    border-color: #D4AF37; background: rgba(212,175,55,0.05);
}
.iex-file-upload-area i { font-size: 2.5rem; color: #D4AF37; margin-bottom: 15px; }
.iex-file-upload-area p { color: var(--iex-text-secondary); font-size: 1rem; margin: 0; }
.iex-file-upload-area p span { color: #D4AF37; font-weight: 600; text-decoration: underline; }
.iex-file-upload-area input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

.iex-preview-container {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px; margin-top: 20px;
}
.iex-preview-item {
    position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.iex-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.iex-preview-item .remove-btn {
    position: absolute; top: 5px; right: 5px;
    background: rgba(220,53,69,0.9); color: white;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; cursor: pointer; border: none;
}
.iex-preview-item.cover-badge::after {
    content: 'PORTADA'; position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(212,175,55,0.9); color: #0A0F1A; font-size: 0.65rem;
    font-weight: 800; text-align: center; padding: 4px 0;
}

/* ── CARDS DE PLANES (Paso 7) ── */
.iex-plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.iex-plan-card { position: relative; cursor: pointer; display: block; }
.iex-plan-card input { position: absolute; opacity: 0; }
.iex-plan-card .plan-content {
    background: rgba(255,255,255,0.03); border: 2px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 25px 20px;
    text-align: center; transition: all 0.3s; height: 100%;
}
.iex-plan-card .plan-badge {
    display: inline-block; padding: 4px 10px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 800; margin-bottom: 15px;
}
.p-active { background: rgba(56,189,248,0.2); color: #38bdf8; }
.p-select { background: rgba(168,85,247,0.2); color: #a855f7; }
.p-premium { background: rgba(212,175,55,0.2); color: #D4AF37; }

.iex-plan-card h4 { font-size: 1.2rem; color: var(--iex-text-primary); margin-bottom: 10px; }
.iex-plan-card p { font-size: 0.85rem; color: var(--iex-text-secondary); margin-bottom: 20px; }
.iex-plan-card .price { display: block; font-size: 1.4rem; font-weight: 800; color: #fff; }

.iex-plan-card:has(input:checked) .plan-content {
    border-color: #D4AF37; background: rgba(212,175,55,0.05);
    transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* ── FOOTER BOTONES ── */
.iex-step-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 40px; padding-top: 25px;
    border-top: 1px solid var(--iex-glass-border, rgba(255,255,255,0.1));
}
.iex-btn-secondary {
    background: transparent; border: 1px solid rgba(255,255,255,0.2);
    color: var(--iex-text-primary); padding: 14px 24px; border-radius: 10px;
    font-weight: 600; cursor: pointer; transition: 0.3s;
}
.iex-btn-secondary:hover { background: rgba(255,255,255,0.05); }

/* Modo Luz */
body.light-mode .iex-publish-wrapper { background: #fff; border-color: #e2e8f0; }
body.light-mode .iex-input,
body.light-mode .iex-file-upload-area { background: #f8fafc; border-color: #cbd5e1; color: #1e293b; }
body.light-mode .iex-input option { background: #fff; color: #1e293b; }
body.light-mode .iex-radio-card { border-color: #cbd5e1; }
body.light-mode .iex-stepper::before { background: #cbd5e1; }
body.light-mode .iex-stepper .step span { background: #f8fafc; border-color: #cbd5e1; color: #64748b; }
body.light-mode .iex-plan-card .plan-content { border-color: #cbd5e1; background: #fff; }
body.light-mode .iex-plan-card .price { color: #1e293b; }

/* Responsive */
@media (max-width: 768px) {
    .iex-grid-2 { grid-template-columns: 1fr; }
    .iex-plans-grid { grid-template-columns: 1fr; }
    .iex-publish-wrapper { padding: 25px 20px; border-radius: 0; border-left: none; border-right: none; }
    .iex-stepper .step p { display: none; } /* Ocultar texto pasos en móvil */
}
