/* ============================================
   Iran dedicated servers: Cloud Dedicated / Bare-Metal
   tabs, comparison tables and the versus block.
   Depends on the variables in dedicated-modern.css
   ============================================ */

.cded-plans {
    --tab: var(--ded-primary);
    --tab-dark: var(--ded-primary-dark);
    --tab-soft: rgba(8, 145, 178, 0.08);
    --tab-line: rgba(8, 145, 178, 0.25);
    padding: 90px 0 70px;
    background: linear-gradient(180deg, #fff 0%, #f5fbfd 100%);
}

.cded-panel-metal, .cded-switch-metal { --tab: #6366f1; --tab-dark: #4338ca; --tab-soft: rgba(99, 102, 241, 0.09); --tab-line: rgba(99, 102, 241, 0.28); }

/* ---------- switch ---------- */
.cded-switch {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 28px;
    padding: 6px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.cded-switch-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 230px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: right;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.cded-switch-btn:hover { background: var(--tab-soft); }
.cded-switch-btn.is-active { background: var(--tab); }

.cded-switch-title {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--ded-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cded-switch-title small {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--tab-soft);
    color: var(--tab-dark);
}

.cded-switch-sub { font-size: 12.5px; color: #64748b; }

.cded-switch-btn.is-active .cded-switch-title,
.cded-switch-btn.is-active .cded-switch-sub { color: #fff; }
.cded-switch-btn.is-active .cded-switch-title small { background: rgba(255, 255, 255, 0.22); color: #fff; }

.cded-new {
    position: absolute;
    top: -10px;
    left: 12px;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.3);
}

/* ---------- panels ---------- */
.cded-panel[hidden] { display: none; }

.cded-panel-desc {
    max-width: 860px;
    margin: 0 auto 22px;
    text-align: center;
    font-size: 14.5px;
    line-height: 1.9;
    color: #64748b;
}

/* ---------- plan tables (override the global table rules) ---------- */
.cded-table-wrap {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.cded-table { width: 100%; border-collapse: collapse; font-size: 15px; color: #334155; }
.cded-table thead { height: auto; background-color: transparent; color: inherit; }
.cded-table tbody tr:nth-child(odd), .cded-table tbody tr:nth-child(even) { background-color: transparent; }

.cded-table thead th, .cded-table tr td {
    padding: 15px 16px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.cded-table thead th {
    background-color: var(--tab-soft);
    color: var(--ded-dark);
    font-size: 13.5px;
    font-weight: 700;
    border-bottom: 1px solid var(--tab-line);
}

.cded-table tbody tr:last-child td { border-bottom: 0; }
.cded-table tbody tr:hover { background-color: var(--tab-soft); }
.cded-table td b { font-weight: 800; color: var(--ded-dark); font-variant-numeric: tabular-nums; }

.cded-col-name { text-align: right !important; min-width: 200px; }
.cded-col-price { white-space: nowrap; }
.cded-col-order { width: 120px; }

.cded-name { font-size: 1.1rem; font-weight: 800; color: var(--ded-dark); }
.cded-tag { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }

.cded-badge {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--tab);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: 2px;
}

.cded-col-price b { color: var(--tab-dark); font-size: 1.1rem; }
.cded-table tbody tr.is-popular { background-color: var(--tab-soft); }
.cded-table tr.is-popular .cded-col-name { box-shadow: inset 4px 0 0 var(--tab); }

.cded-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 92px;
    padding: 9px 16px;
    border-radius: 9px;
    background: var(--tab);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, transform .2s ease;
}

.cded-order:hover { background: var(--tab-dark); color: #fff; transform: translateY(-1px); }

.cded-order.is-soldout {
    background: #fff;
    color: #94a3b8;
    border: 1.5px dashed #cbd5e1;
    cursor: help;
}
.cded-order.is-soldout:hover { background: #f8fafc; color: #64748b; transform: none; }
.cded-table tr:has(.is-soldout) .cded-col-price b { color: #94a3b8; }
.cded-order i { font-size: 11px; }

.cded-includes {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.cded-includes li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ded-dark);
}

.cded-includes svg { color: var(--tab); }

.cded-note { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: #64748b; }

/* ---------- versus ---------- */
.cded-versus { margin-top: 64px; }

.cded-versus-head { text-align: center; margin-bottom: 26px; }
.cded-versus-head h3 { font-size: 1.8rem; font-weight: 800; color: var(--ded-dark); margin: 0 0 8px; }
.cded-versus-head p { font-size: 15px; color: #64748b; margin: 0; }

.cded-versus-table-wrap {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.cded-versus-table { width: 100%; border-collapse: collapse; font-size: 14.5px; color: #334155; }
.cded-versus-table thead { height: auto; background-color: transparent; color: inherit; }
.cded-versus-table tbody tr:nth-child(odd), .cded-versus-table tbody tr:nth-child(even) { background-color: transparent; }

.cded-versus-table thead th, .cded-versus-table tr td {
    padding: 14px 18px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.cded-versus-table thead th { font-size: 15px; font-weight: 800; color: var(--ded-dark); background-color: #f8fafc; }
.cded-versus-table thead th small { display: block; font-size: 11px; font-weight: 700; color: #64748b; margin-top: 2px; }
.cded-versus-table thead th.cded-vs-cloud { background-color: rgba(8, 145, 178, 0.10); color: var(--ded-primary-dark); }
.cded-versus-table thead th.cded-vs-cloud small { color: var(--ded-primary-dark); }
.cded-versus-table tbody tr:last-child td { border-bottom: 0; }

.cded-versus-table td.cded-vs-label,
.cded-versus-table th.cded-vs-label { text-align: right; font-weight: 700; color: var(--ded-dark); width: 30%; }
.cded-versus-table td.cded-vs-cloud { background-color: rgba(8, 145, 178, 0.04); font-weight: 600; }

.cded-yes, .cded-no { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.cded-yes { color: #059669; }
.cded-no { color: #dc2626; }

.cded-versus-note { margin: 18px 0 0; text-align: center; font-size: 14px; color: #64748b; }

.cded-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--ded-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
    .cded-table thead th, .cded-table tr td { padding: 12px 10px; font-size: 14px; }
    .cded-col-name { min-width: 150px; }
}

@media (max-width: 767px) {
    .cded-plans { padding: 60px 0 40px; }
    .cded-switch { width: 100%; flex-direction: column; }
    .cded-switch-btn { min-width: 0; }

    .cded-table thead { display: none; }
    .cded-table, .cded-table tbody, .cded-table tr, .cded-table td { display: block; }
    .cded-table tr { padding: 14px 16px 16px; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
    .cded-table tr:last-child { border-bottom: 0; }
    .cded-table tr td { display: flex; align-items: center; gap: 5px; padding: 7px 0; border: 0; text-align: right; font-size: 14px; }
    .cded-table td[data-label]::before { content: attr(data-label); color: #64748b; font-size: 13px; margin-left: auto; }
    .cded-col-name { display: block !important; min-width: 0; padding-bottom: 10px !important; }
    .cded-col-order { width: auto; padding-top: 12px !important; }
    .cded-order { width: 100%; }
    .cded-table tr.is-popular .cded-col-name { box-shadow: none; }
    .cded-table tbody tr.is-popular { background-color: var(--tab-soft); }

    .cded-versus-table thead { display: none; }
    .cded-versus-table, .cded-versus-table tbody, .cded-versus-table tr, .cded-versus-table td { display: block; }
    .cded-versus-table tr { padding: 12px 16px; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
    .cded-versus-table tr td { padding: 6px 0; border: 0; text-align: right; width: auto; }
    .cded-versus-table td.cded-vs-label { font-size: 15px; padding-bottom: 8px; }
    .cded-versus-table td.cded-vs-cloud, .cded-versus-table td.cded-vs-metal { display: flex; align-items: center; gap: 6px; background: transparent; }
    .cded-versus-table td[data-label]::before { content: attr(data-label); color: #64748b; font-size: 12.5px; margin-left: auto; white-space: nowrap; }
}
