/*
 * Ad Type UI - Final Fixed Version
 * ✅ نسخه 4.1.0 - استفاده از Font Awesome به جای ایموجی
 * ✅ بهینه‌سازی استایل‌ها و ریسپانسیو
 * Path: 100tik/templates/forms/sections/ad-type/ad-type.css
 */

/* ============================================================
   استایل اصلی فرم
   ============================================================ */
.sadtik-modern-wrapper {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    font-family: 'Estedad', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
    box-sizing: border-box;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.sadtik-modern-wrapper:hover {
    box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

/* ============================================================
   هدر بخش
   ============================================================ */
.modern-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.header-icon {
    background: #eff6ff;
    color: #2563eb;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.header-icon:hover {
    background: #2563eb;
    color: #ffffff;
    transform: scale(1.02);
}

.header-title {
    font-weight: 700;
    font-size: 16px;
    color: #1e293b;
    font-family: 'Estedad', sans-serif;
}

/* ============================================================
   کارت‌های انتخاب
   ============================================================ */
.modern-grid-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.selector-card {
    position: relative;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    user-select: none;
}

.selector-card input {
    display: none;
}

.card-visual {
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.card-visual.vip {
    color: #f59e0b;
}

.card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    display: block;
    font-family: 'Estedad', sans-serif;
}

.card-title i {
    margin-left: 4px;
}

.card-sub {
    font-size: 12px;
    color: #94a3b8;
    font-family: 'Estedad', sans-serif;
}

.selector-card.active {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.selector-card.active .card-visual {
    background: #2563eb;
    color: #fff;
}

.selector-card.active .card-visual.vip {
    background: #f59e0b;
}

/* ============================================================
   پنل VIP
   ============================================================ */
.vip-modern-panel {
    animation: slideDown 0.3s ease-out;
}

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

.control-block {
    margin-bottom: 25px;
    padding: 0 5px;
}

.block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.block-header .label {
    font-weight: 700;
    font-size: 14px;
    color: #475569;
    font-family: 'Estedad', sans-serif;
}

.block-header .price-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-right: auto;
    margin-left: 10px;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 30px;
    font-family: 'Estedad', sans-serif;
}

.block-header .icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.block-header .icon.power {
    background: #fff7ed;
    color: #f97316;
}

.block-header .icon.time {
    background: #eff6ff;
    color: #3b82f6;
}

/* ============================================================
   استپر (دکمه‌های + و -)
   ============================================================ */
.modern-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 5px;
    height: 50px;
}

.step-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    z-index: 2;
    transition: all 0.2s ease;
}

.step-btn:active {
    transform: scale(0.95);
}

.step-btn.minus {
    background: #ef4444;
    color: #fff;
}

.step-btn.minus:hover {
    background: #dc2626;
    transform: scale(1.02);
}

.step-btn.plus {
    background: #2563eb;
    color: #fff;
}

.step-btn.plus:hover {
    background: #1d4ed8;
    transform: scale(1.02);
}

.step-btn i {
    font-size: 14px;
    pointer-events: none;
}

.input-centered {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.input-centered input {
    width: 100px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    outline: none;
    padding: 0;
    margin: 0;
    font-family: 'Estedad', monospace;
    font-feature-settings: "ss02";
    -moz-appearance: textfield;
}

.input-centered input::-webkit-outer-spin-button,
.input-centered input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-centered .suffix-text {
    font-size: 13px;
    color: #64748b;
    font-family: 'Estedad', sans-serif;
}

/* ============================================================
   فاکتور (Invoice)
   ============================================================ */
.modern-invoice {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
}

.invoice-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 5px;
    font-weight: 600;
    font-family: 'Estedad', sans-serif;
}

.invoice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.invoice-price {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Estedad', sans-serif;
}

.invoice-price small {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}

.price-words {
    font-size: 12px;
    color: #2563eb;
    font-weight: 500;
    background: #eff6ff;
    padding: 3px 12px;
    border-radius: 30px;
    font-family: 'Estedad', sans-serif;
}

.invoice-date-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Estedad', sans-serif;
}

.invoice-date-row i {
    margin-left: 6px;
    color: #3b82f6;
}

.invoice-date-row strong {
    color: #334155;
    font-weight: 700;
    background: #e2e8f0;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-family: 'Estedad', sans-serif;
}

/* ============================================================
   پنل رایگان
   ============================================================ */
.free-modern-panel {
    animation: slideDown 0.3s ease-out;
}

.free-invoice {
    background: #e8f5e9;
    border-color: #a5d6a7;
}

.free-invoice .invoice-price {
    color: #2e7d32;
}

.free-invoice .price-words {
    color: #2e7d32;
    background: rgba(46, 125, 50, 0.08);
}

/* ============================================================
   بخش مدیریت وضعیت آگهی (مینیمال)
   ============================================================ */
.sadtik-expire-section-minimal {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 18px;
    margin-top: 20px;
    font-family: 'Estedad', sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.sadtik-expire-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.sadtik-expire-status-minimal {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #475569;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.active {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.status-dot.expired {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.status-text strong {
    color: #1e293b;
}

.status-date-minimal {
    font-size: 12px;
    color: #94a3b8;
}

.sadtik-expire-btn-minimal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Estedad', sans-serif;
    margin-right: auto;
}

.sadtik-expire-btn-minimal:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.sadtik-expire-btn-minimal:active {
    transform: translateY(0);
}

.sadtik-expire-btn-minimal i {
    font-size: 14px;
}

/* ============================================================
   بنر تبلیغاتی VIP
   ============================================================ */
.vip-promo-banner {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d1 100%);
    border-right: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.promo-icon {
    font-size: 28px;
    background: #f59e0b;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.promo-icon i {
    font-size: 24px;
    color: white;
}

.promo-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #7c2d12;
    line-height: 1.5;
}

.promo-text i {
    margin-left: 4px;
}

.promo-text strong {
    color: #ea580c;
    font-weight: 800;
}

/* ============================================================
   ریسپانسیو
   ============================================================ */
@media (max-width: 768px) {
    .sadtik-modern-wrapper {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .modern-grid-selector {
        gap: 12px;
    }
    
    .selector-card {
        padding: 12px;
    }
    
    .card-visual {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    
    .card-title {
        font-size: 13px;
    }
    
    .step-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .modern-stepper {
        height: 48px;
    }
    
    .input-centered input {
        width: 85px;
        font-size: 17px;
    }
}

@media (max-width: 576px) {
    .sadtik-modern-wrapper {
        padding: 14px;
        margin-bottom: 14px;
    }
    
    .modern-header {
        gap: 10px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }
    
    .header-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    
    .header-title {
        font-size: 15px;
    }
    
    .modern-grid-selector {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .selector-card {
        padding: 10px;
        gap: 10px;
    }
    
    .card-visual {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    
    .card-title {
        font-size: 12px;
    }
    
    .card-sub {
        font-size: 10px;
    }
    
    .step-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .modern-stepper {
        height: 44px;
        padding: 4px;
    }
    
    .input-centered input {
        width: 70px;
        font-size: 16px;
    }
    
    .input-centered .suffix-text {
        font-size: 11px;
    }
    
    .modern-invoice {
        padding: 12px;
        margin-top: 16px;
    }
    
    .invoice-price {
        font-size: 18px;
    }
    
    .price-words {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .invoice-date-row {
        font-size: 11px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .sadtik-expire-section-minimal {
        padding: 10px 14px;
    }
    
    .sadtik-expire-status-minimal {
        font-size: 12px;
        gap: 6px;
    }
    
    .sadtik-expire-btn-minimal {
        padding: 5px 14px;
        font-size: 12px;
    }
    
    .status-date-minimal {
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .sadtik-modern-wrapper {
        padding: 12px;
    }
    
    .selector-card {
        padding: 8px;
    }
    
    .card-visual {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .card-title {
        font-size: 11px;
    }
    
    .step-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .input-centered input {
        width: 60px;
        font-size: 15px;
    }
}

/* ============================================================
   دسترسی‌پذیری
   ============================================================ */
.selector-card:focus-visible,
.step-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .vip-modern-panel,
    .free-modern-panel {
        animation: none;
    }
    
    .step-btn:active,
    .step-btn:hover,
    .selector-card:hover {
        transform: none;
    }
}