/* VDC Wizard - CloudKey */

.orderpage-onestep_cloudkey {
    --vdc-surface: #363636;
    --vdc-surface-alt: #2f2f2f;
    --vdc-surface-active: #3d3d3d;
    --vdc-border: rgba(255, 255, 255, .12);
    --vdc-text: rgba(255, 255, 255, .92);
    --vdc-muted: rgba(255, 255, 255, .65);
    --vdc-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.orderpage-onestep_cloudkey,
.orderpage-onestep_cloudkey h1,
.orderpage-onestep_cloudkey h2,
.orderpage-onestep_cloudkey h3,
.orderpage-onestep_cloudkey h4,
.orderpage-onestep_cloudkey h5,
.orderpage-onestep_cloudkey h6,
.orderpage-onestep_cloudkey label,
.orderpage-onestep_cloudkey .card,
.orderpage-onestep_cloudkey .card-body {
    color: var(--vdc-text);
}

.orderpage-onestep_cloudkey .text-muted,
.orderpage-onestep_cloudkey .small.text-muted,
.orderpage-onestep_cloudkey small.text-muted,
.orderpage-onestep_cloudkey .text-small.text-muted {
    color: var(--vdc-muted) !important;
}

.vdc-step-panel {
    display: none;
}

.vdc-step-panel.is-active {
    display: block;
}

.vdc-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: -.5rem 0 1.5rem;
}

.vdc-step-actions-final {
    margin-top: 0;
}

.vdc-step-actions > :only-child {
    margin-right: auto;
}

/* The summary is replaced by AJAX. Keep a fresh Checkout button hidden while
   the stable wizard container says the user is already on Checkout. */
.orderpage-onestep_cloudkey[data-current-step="checkout"] .vdc-summary-checkout-action {
    display: none !important;
}

/* ── Progress Indicator ── */

.vdc-wizard-header {
    position: -webkit-sticky;
    position: sticky;
    top: 70px;
    z-index: 900;
    background: var(--vdc-surface-alt);
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid var(--vdc-border);
    margin-bottom: 1.5rem;
    border-radius: .75rem;
    box-shadow: var(--vdc-shadow);
}

.vdc-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.vdc-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    text-align: center;
}

.vdc-progress-step.is-hidden {
    display: none;
}

.vdc-progress-step.is-last-visible::after {
    display: none;
}

.vdc-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: rgba(255, 255, 255, .14);
    z-index: 0;
}

.vdc-progress-step.completed:not(:last-child)::after {
    background: #28a745;
}

.vdc-progress-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--vdc-border);
    background: rgba(255, 255, 255, .08);
    color: var(--vdc-muted);
    font-weight: 700;
    font-size: 14px;
    position: relative;
    z-index: 1;
    transition: all .2s ease;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    padding: 0;
}

.vdc-progress-icon:hover {
    text-decoration: none;
    transform: scale(1.1);
}

.vdc-progress-step.active .vdc-progress-icon {
    background: var(--primary, #007bff);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, .2);
}

.vdc-progress-step.completed .vdc-progress-icon {
    background: #28a745;
    color: #fff;
}

.vdc-progress-icon:hover {
    color: #fff;
    background: var(--primary, #007bff);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, .15);
}

.orderpage-onestep_cloudkey .vdc-step-actions .btn-outline-secondary {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .18);
    color: var(--vdc-text);
    box-shadow: none;
}

.orderpage-onestep_cloudkey .vdc-step-actions .btn-outline-secondary:hover,
.orderpage-onestep_cloudkey .vdc-step-actions .btn-outline-secondary:focus {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .32);
    color: #fff;
}

.vdc-progress-label {
    margin-top: .5rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--vdc-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.vdc-progress-step.active .vdc-progress-label {
    color: var(--primary, #007bff);
}

.vdc-progress-step.completed .vdc-progress-label {
    color: #28a745;
}

/* ── Location Cards ── */

.vdc-location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.vdc-location-card {
    border: 2px solid var(--vdc-border);
    border-radius: .75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
    background: var(--vdc-surface);
    position: relative;
    overflow: hidden;
    box-shadow: var(--vdc-shadow);
}

.vdc-location-card:hover:not(.outofstock):not(.selected) {
    border-color: var(--primary, #007bff);
    box-shadow: 0 4px 24px rgba(0, 123, 255, .12);
    transform: translateY(-2px);
}

.vdc-location-card.outofstock {
    opacity: .6;
    cursor: default;
}

.vdc-location-card.selected {
    border-color: var(--primary, #007bff);
    background: linear-gradient(180deg, rgba(56, 145, 242, .18) 0%, rgba(56, 145, 242, .08) 100%), var(--vdc-surface-active);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, .15), 0 4px 24px rgba(0, 123, 255, .08);
}

.vdc-location-card.selected .vdc-select-label .btn {
    background: #28a745;
    border-color: #28a745;
}

.vdc-location-card.selected .vdc-select-label .btn::after {
    content: ' \2713';
}

.vdc-location-card .location-skyline {
    width: calc(100% + 3rem);
    height: 230px;
    margin: -2rem -1.5rem 1rem -1.5rem;
    overflow: hidden;
    border-radius: .75rem .75rem 0 0;
    background: linear-gradient(135deg, #e3f0ff 0%, #f0f4f8 100%);
}

.vdc-location-card .location-skyline img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom;
    display: block;
}

.vdc-location-card .location-skyline-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #007bff);
    font-size: 3rem;
}

.vdc-location-card .location-skyline-fallback .material-icons {
    font-size: inherit;
}

.vdc-location-card .location-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .25rem;
}

.vdc-location-card .location-region {
    font-size: .875rem;
    color: var(--vdc-muted);
}

.vdc-location-card .btn {
    margin-top: 1.25rem;
}

/* ── Config Sections ── */

.vdc-config-section {
    background: var(--vdc-surface);
    border: 1px solid var(--vdc-border);
    border-radius: .5rem;
    box-shadow: var(--vdc-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.vdc-config-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary, #007bff);
    margin-bottom: 0;
}

.vdc-bcdr-hidden {
    display: none !important;
}

/* BCDR tier and Zerto license belong on the primary VDC only */
.vdc-secondary-datacenter-option .cf_bcdr_tier,
.vdc-secondary-datacenter-option .cf_zerto_license {
    display: none !important;
}

.vdc-bcdr-tier-guide {
    padding: .75rem 1rem;
    border-left: 3px solid #EA6624;
    background: rgba(255, 255, 255, .04);
    border-radius: 0 .35rem .35rem 0;
}

.vdc-bcdr-tier-guide ul {
    margin-bottom: 0;
}

.vdc-config-option {
    padding: .75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.vdc-config-option:last-child {
    border-bottom: none;
}

.vdc-config-option label {
    font-weight: 600;
    margin-bottom: .25rem;
    display: block;
}

.vdc-config-option .option-description {
    font-size: .8rem;
    color: var(--vdc-muted);
    margin-bottom: .5rem;
}

/* ── IOPS Tier Cards ── */

.vdc-tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.vdc-tier-card {
    border: 2px solid var(--vdc-border);
    border-radius: .5rem;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
    background: rgba(255, 255, 255, .03);
}

.vdc-tier-card:hover {
    border-color: var(--primary, #007bff);
}

.vdc-tier-card.selected {
    border-color: var(--primary, #007bff);
    background: rgba(0, 123, 255, .04);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, .15);
}

.vdc-tier-card input[type="radio"] {
    display: none;
}

.vdc-tier-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary, #007bff);
}

.vdc-tier-label {
    font-size: .75rem;
    color: var(--vdc-muted);
    text-transform: uppercase;
    margin-top: .25rem;
}

/* ── Add-on Rows ── */

.vdc-addon-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .875rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.vdc-addon-row:last-child {
    border-bottom: none;
}

.vdc-addon-info {
    flex: 1;
}

.vdc-addon-info .addon-name {
    font-weight: 600;
    font-size: .95rem;
}

.vdc-addon-info .addon-desc {
    font-size: .8rem;
    color: var(--vdc-muted);
}

.vdc-addon-control {
    flex-shrink: 0;
    margin-left: 1rem;
    min-width: 120px;
}

/* ── Remote Backup Storage ── */

.vdc-remote-backup-storage {
    padding: 1.25rem;
    border: 1px solid rgba(56, 145, 242, .28);
    border-radius: .9rem;
    background: linear-gradient(180deg, rgba(56, 145, 242, .12) 0%, rgba(56, 145, 242, .05) 100%), var(--vdc-surface-alt);
    box-shadow: var(--vdc-shadow);
}

.vdc-remote-backup-intro {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.vdc-remote-backup-intro h5 {
    color: var(--vdc-text);
}

.vdc-remote-backup-option {
    padding: 1rem;
    margin-bottom: .875rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: .75rem;
    background: rgba(20, 20, 20, .28);
}

.vdc-remote-backup-option:last-child {
    margin-bottom: 0;
}

.vdc-remote-backup-option .vdc-addon-row {
    padding: 0;
    border-bottom: none;
}

.vdc-remote-backup-option .addon-name {
    font-size: 1rem;
}

.vdc-remote-backup-option .subproduct-items {
    padding: 1rem 0 0;
    margin-top: 1rem !important;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.vdc-remote-backup-option .cart-form {
    padding: .875rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .035);
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .vdc-location-grid {
        grid-template-columns: 1fr;
    }

    .vdc-tier-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vdc-progress-label {
        font-size: .65rem;
    }

    .vdc-progress-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .vdc-progress-step:not(:last-child)::after {
        top: 15px;
        left: calc(50% + 16px);
        width: calc(100% - 32px);
    }

    .vdc-addon-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .vdc-addon-control {
        margin-left: 0;
        margin-top: .5rem;
        width: 100%;
    }

    .vdc-remote-backup-storage {
        padding: 1rem;
    }

    .vdc-remote-backup-option .vdc-addon-control {
        margin-top: .75rem;
    }

    .vdc-wizard-header {
        position: relative;
    }

    .vdc-step-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
}
