/* ========================================
   CHECKOUT FLOW STYLES
   Revelation Hosting - Public Checkout
   ======================================== */

/* ==================
   Progress Bar
   ================== */
.checkout-progress {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.checkout-step .step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6c757d;
    transition: all 0.3s ease;
}

.checkout-step.active .step-icon {
    background: var(--primary, #0d6efd);
    color: white;
}

.checkout-step.completed .step-icon {
    background: #28a745;
    color: white;
}

.checkout-step .step-label {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

.checkout-step.active .step-label,
.checkout-step.completed .step-label {
    color: #212529;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: #e9ecef;
    margin: 0 10px;
    max-width: 100px;
}

.progress-line.completed {
    background: #28a745;
}

/* ==================
   Size Cards
   ================== */
.size-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    background: white;
}

.size-card:hover {
    border-color: var(--primary, #0d6efd);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.size-card.selected {
    border-color: var(--primary, #0d6efd);
    background: rgba(13, 110, 253, 0.05);
}

.size-card.free-tier {
    border-color: #28a745;
}

.size-card.free-tier.selected {
    background: rgba(40, 167, 69, 0.05);
}

.size-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.size-card-header .size-name {
    font-weight: 600;
    font-size: 18px;
}

.size-card-price {
    text-align: center;
    margin-bottom: 15px;
}

.size-card-price .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary, #0d6efd);
}

.size-card-price .period {
    font-size: 14px;
    color: #6c757d;
}

.size-card-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.size-card-specs .spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
}

.size-card-specs .spec-item i {
    width: 20px;
    color: var(--primary, #0d6efd);
}

/* ==================
   Region Cards
   ================== */
.region-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.region-card:hover {
    border-color: var(--primary, #0d6efd);
}

.region-card.selected {
    border-color: var(--primary, #0d6efd);
    background: rgba(13, 110, 253, 0.05);
}

.region-flag img {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.region-info {
    display: flex;
    flex-direction: column;
}

.region-name {
    font-weight: 600;
}

.region-location {
    font-size: 13px;
    color: #6c757d;
}

.region-latency {
    font-size: 12px;
    color: #28a745;
}

.region-latency.high {
    color: #ffc107;
}

.region-latency.very-high {
    color: #dc3545;
}

/* ==================
   Billing Cycles
   ================== */
.billing-cycles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.billing-option {
    flex: 1;
    min-width: 120px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.billing-option:hover {
    border-color: var(--primary, #0d6efd);
}

.billing-option.selected {
    border-color: var(--primary, #0d6efd);
    background: rgba(13, 110, 253, 0.05);
}

.billing-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.billing-discount .badge {
    font-size: 11px;
}

/* ==================
   Tier Selector
   ================== */
.tier-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tier-option {
    flex: 1;
    min-width: 100px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tier-option:hover {
    border-color: var(--primary, #0d6efd);
}

.tier-option.selected {
    border-color: var(--primary, #0d6efd);
    background: rgba(13, 110, 253, 0.05);
}

.tier-name {
    font-weight: 600;
}

.tier-premium {
    font-size: 12px;
    color: #6c757d;
}

/* ==================
   Addon Options
   ================== */
.addon-section-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #495057;
}

.addon-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.addon-option {
    flex: 1;
    min-width: 150px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.addon-option:hover {
    border-color: var(--bs-primary, #0d6efd);
}

.addon-option.selected {
    border-color: var(--bs-primary, #0d6efd);
    background: rgba(13, 110, 253, 0.05);
}

/* Palette-based addon colors - icon tiles follow the card's palette */
.addon-icon {
    font-size: 24px;
    color: var(--bs-primary, #0d6efd);
    transition: color 0.4s ease, background-color 0.4s ease;
}

/* 2-option palette: danger (0) -> primary (1) */
.addon-2-opt-0 .addon-icon { color: #dc3545; }
.addon-2-opt-1 .addon-icon { color: var(--bs-primary, #0d6efd); }

/* 3-option palette: danger (0) -> info (1) -> primary (2) */
.addon-3-opt-0 .addon-icon { color: #dc3545; }
.addon-3-opt-1 .addon-icon { color: #17a2b8; }
.addon-3-opt-2 .addon-icon { color: var(--bs-primary, #0d6efd); }

/* 4-option palette: danger (0) -> warning (1) -> info (2) -> primary (3) */
.addon-4-opt-0 .addon-icon { color: #dc3545; }
.addon-4-opt-1 .addon-icon { color: #ffc107; }
.addon-4-opt-2 .addon-icon { color: #17a2b8; }
.addon-4-opt-3 .addon-icon { color: var(--bs-primary, #0d6efd); }

.addon-details {
    display: flex;
    flex-direction: column;
}

.addon-name {
    font-weight: 600;
}

.addon-price {
    font-size: 13px;
    color: #6c757d;
}

/* ==================
   Order Summary
   ================== */
.order-summary-card .card-header {
    padding: 15px 20px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-game-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.summary-item-details {
    display: flex;
    flex-direction: column;
}

.summary-game-title {
    font-weight: 600;
}

.summary-size {
    font-size: 14px;
    color: #6c757d;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-row.subtotal {
    font-weight: 600;
}

.price-row.total {
    font-size: 18px;
    font-weight: 700;
}

.total-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.total-amount {
    font-size: 24px;
}

.billing-period {
    font-size: 14px;
    font-weight: normal;
    color: #6c757d;
}

.discount-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

/* ==================
   Review Page
   ================== */
.review-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.review-item-icon {
    flex-shrink: 0;
}

.review-item-content {
    display: flex;
    flex-direction: column;
}

.review-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-value {
    font-weight: 600;
    font-size: 16px;
}

.addon-review-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    height: 100%;
}

.addon-review-label {
    font-size: 12px;
    color: #6c757d;
}

.addon-review-value {
    font-weight: 600;
}

.addon-review-price {
    font-size: 14px;
    color: #6c757d;
}

/* ==================
   Complete Page
   ================== */
.account-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
}

.account-option.selected {
    border-color: var(--primary, #0d6efd);
}

.account-option-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.account-form {
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.password-strength {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength .strength-bar {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
}

.password-strength.weak .strength-bar {
    width: 25%;
    background: #dc3545;
}

.password-strength.fair .strength-bar {
    width: 50%;
    background: #ffc107;
}

.password-strength.good .strength-bar {
    width: 75%;
    background: #28a745;
}

.password-strength.strong .strength-bar {
    width: 100%;
    background: #28a745;
}

.payment-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-method {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-method:hover {
    border-color: var(--primary, #0d6efd);
}

.payment-method.selected {
    border-color: var(--primary, #0d6efd);
    background: rgba(13, 110, 253, 0.05);
}

/* ==================
   Confirmation Page
   ================== */
.bg-success-alt {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.success-animation {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -30px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6c757d;
}

.timeline-item.completed .timeline-icon {
    background: #28a745;
    color: white;
}

.timeline-item.in-progress .timeline-icon {
    background: var(--primary, #0d6efd);
    color: white;
}

.timeline-content h6 {
    margin-bottom: 5px;
}

/* ==================
   Responsive
   ================== */
@media (max-width: 768px) {
    .checkout-step {
        min-width: 60px;
    }
    
    .checkout-step .step-label {
        font-size: 12px;
    }
    
    .progress-line {
        max-width: 40px;
    }
    
    .billing-option {
        min-width: 100%;
    }
    
    .addon-option {
        min-width: 100%;
    }
    
    .payment-methods {
        flex-direction: column;
    }
}
