/**
 * WP Host Billing - Checkout Page Styles
 * Modern, clean checkout interface
 */

/* ===================================
   Checkout Container
   =================================== */
.whb-checkout-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.whb-checkout-header {
    text-align: center;
    margin-bottom: 40px;
    display: none;
}

.whb-checkout-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px;
}

.whb-checkout-subtitle {
    font-size: 16px;
    color: #718096;
    margin: 0;
}

/* ===================================
   User Account Info
   =================================== */
.whb-user-account-info {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whb-user-icon {
    font-size: 20px;
}

.whb-logout-link {
    margin-left: auto;
    color: #4299e1;
    text-decoration: none;
    font-weight: 500;
}

.whb-logout-link:hover {
    color: #2b6cb0;
    text-decoration: underline;
}

.whb-account-options {
    background: #edf2f7;
    border-left: 4px solid #4299e1;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.whb-account-options-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.whb-info-icon {
    font-size: 18px;
}

.whb-login-link {
    color: #4299e1;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.whb-login-link:hover {
    color: #2b6cb0;
    text-decoration: underline;
}

/* ===================================
   Checkout Layout
   =================================== */
.whb-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    .whb-checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .whb-checkout-summary-section {
        order: -1;
    }
}

/* ===================================
   Checkout Cards
   =================================== */
.whb-checkout-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.whb-card-header {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: var(--e-global-primary, var(--whb-primary));
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.whb-card-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whb-card-icon {
    font-size: 22px;
}

.whb-card-body {
    padding: 24px;
    display: inline-block;
}

/* ===================================
   Form Fields
   =================================== */
.whb-form-field {
    margin-bottom: 20px;
}

.whb-form-field label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

.whb-form-field .required {
    color: #e53e3e;
    margin-left: 3px;
}

.whb-form-field .optional {
    color: #a0aec0;
    font-weight: 400;
    font-size: 13px;
}

.whb-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #2d3748;
    transition: all 0.3s ease;
    background: #ffffff;
}

.whb-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.whb-form-control:read-only {
    background: #f7fafc;
    color: #718096;
    cursor: not-allowed;
}

.whb-form-control::placeholder {
    color: #a0aec0;
}

/* Phone Input with Country Code */
.whb-phone-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.whb-phone-code {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
    color: #2d3748;
    font-weight: 600;
    font-size: 15px;
    min-width: 80px;
    white-space: nowrap;
}

.whb-phone-input-wrapper .whb-form-control {
    flex: 1;
}

.whb-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #718096;
}

/* Form Rows */
.whb-form-row {
    display: grid;
    gap: 20px;
}

.whb-form-row-2 {
    grid-template-columns: 1fr 1fr;
}

.whb-form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {
    .whb-form-row-2,
    .whb-form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Payment Methods
   =================================== */
.whb-payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.whb-payment-method {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.whb-payment-method.active {
    border-color: #667eea;
    background: #f7fafc;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.1);
}

.whb-payment-method-label {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    gap: 12px;
}

.whb-payment-method-input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.whb-payment-method-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.whb-payment-method-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 15px;
}

.whb-payment-method-description {
    font-size: 13px;
    color: #718096;
}

.whb-payment-method-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.whb-payment-method-form {
    padding: 0 16px 16px;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
    padding-top: 16px;
}

/* ===================================
   Checkout Actions
   =================================== */
.whb-checkout-actions {
    margin-top: 30px;
}

.whb-place-order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

.whb-place-order-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.whb-place-order-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.whb-place-order-btn.loading {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
}

.whb-place-order-btn.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.whb-btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.whb-place-order-btn:hover .whb-btn-icon {
    transform: translateX(4px);
}

.whb-secure-notice {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.whb-secure-icon {
    font-size: 16px;
    color: #48bb78;
}

/* ===================================
   Order Summary
   =================================== */
.whb-order-summary {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.whb-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.whb-summary-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whb-summary-icon {
    font-size: 22px;
}

.whb-summary-count {
    background: #667eea;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Summary Items */
.whb-summary-items {
    margin-bottom: 20px;
}

.whb-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f7fafc;
}

.whb-summary-item:last-child {
    border-bottom: none;
}

.whb-summary-item-details {
    flex: 1;
}

.whb-summary-item-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    font-size: 15px;
}

.whb-summary-item-meta {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #718096;
}

.whb-summary-item-cycle {
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.whb-summary-item-quantity {
    color: #4299e1;
    font-weight: 600;
}

.whb-summary-item-price {
    font-weight: 700;
    color: #2d3748;
    font-size: 16px;
    white-space: nowrap;
}

/* Summary Divider */
.whb-summary-divider {
    height: 2px;
    background: #e2e8f0;
    margin: 16px 0;
}

/* Summary Totals */
.whb-summary-totals {
    margin-bottom: 20px;
}

.whb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 15px;
}

.whb-summary-row.whb-subtotal,
.whb-summary-row.whb-tax {
    color: #718096;
}

.whb-summary-row.whb-discount {
    color: #48bb78;
}

.whb-discount-icon {
    margin-right: 4px;
}

.whb-discount-value {
    color: #48bb78;
    font-weight: 600;
}

.whb-summary-row.whb-total {
    border-top: 2px solid #e2e8f0;
    margin-top: 8px;
    padding-top: 16px;
    font-size: 18px;
    color: #1a202c;
}

.whb-total-value {
    color: #667eea;
    font-size: 22px;
}

/* Summary Actions */
.whb-summary-actions {
    margin-bottom: 20px;
}

.whb-edit-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.whb-edit-cart-btn:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

/* Summary Footer */
.whb-summary-footer {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.whb-summary-guarantee,
.whb-summary-support {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4a5568;
    margin: 8px 0;
}

.whb-guarantee-icon,
.whb-support-icon {
    font-size: 16px;
    color: #48bb78;
}

/* ===================================
   Notices
   =================================== */
.whb-notice {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.whb-notice-warning {
    background: #fef5e7;
    border-left: 4px solid #f39c12;
    color: #7d6608;
}

.whb-notice-info {
    background: #edf2f7;
    border-left: 4px solid #4299e1;
    color: #2c5282;
}

.whb-notice-success {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
    color: #22543d;
}

.whb-notice-error {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    color: #742a2a;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .whb-checkout-title {
        font-size: 24px;
    }
    
    .whb-checkout-subtitle {
        font-size: 14px;
    }
    
    .whb-card-header {
        padding: 16px 20px;
    }
    
    .whb-card-body {
        padding: 20px;
    }
    
    .whb-order-summary {
        position: static;
        margin-bottom: 30px;
    }
    
    .whb-checkout-actions {
        margin-top: 20px;
    }
}

/* ===================================
   Loading States
   =================================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===================================
   Thank You Page Styles
   =================================== */
.whb-thankyou-page-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.whb-thankyou-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.whb-order-received,
.whb-order-error {
    padding: 60px 40px;
    text-align: center;
}

.whb-order-received-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: #48bb78;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

/* Status-specific icon colors */
.whb-order-received-icon.whb-status-success {
    background: #48bb78;
}

.whb-order-received-icon.whb-status-failed {
    background: #f56565;
}

.whb-order-received-icon.whb-status-pending {
    background: #ed8936;
}

.whb-order-received-icon.whb-status-cancelled {
    background: #718096;
}

.whb-order-received-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 15px;
}

.whb-order-received-text {
    font-size: 16px;
    color: #718096;
    margin: 0 0 40px;
    line-height: 1.6;
}

.whb-order-details {
    background: #f7fafc;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.whb-order-details h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 20px;
    text-align: center;
}

.whb-order-details-table {
    width: 100%;
    border-collapse: collapse;
}

.whb-order-details-table th,
.whb-order-details-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.whb-order-details-table th {
    font-weight: 600;
    color: #4a5568;
    width: 40%;
}

.whb-order-details-table td {
    color: #1a202c;
}

.whb-order-details-table tr:last-child th,
.whb-order-details-table tr:last-child td {
    border-bottom: none;
}

.whb-invoice-status,
.whb-payment-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.whb-status-paid,
.whb-payment-success {
    background: #c6f6d5;
    color: #22543d;
}

.whb-status-pending,
.whb-payment-pending {
    background: #feebc8;
    color: #7c2d12;
}

.whb-status-unpaid,
.whb-payment-failed {
    background: #fed7d7;
    color: #742a2a;
}

.whb-status-cancelled,
.whb-payment-cancelled {
    background: #e2e8f0;
    color: #2d3748;
}

.whb-thankyou-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.whb-btn-large {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
}

/* Order Error Styles */
.whb-order-error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: #fed7d7;
    color: #742a2a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.whb-order-error h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 15px;
}

.whb-order-error p {
    font-size: 16px;
    color: #718096;
    margin: 0 0 30px;
}

.whb-error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design for Thank You Page */
@media (max-width: 768px) {
    .whb-thankyou-page-wrapper {
        padding: 0 15px;
    }
    
    .whb-order-received,
    .whb-order-error {
        padding: 40px 20px;
    }
    
    .whb-order-received-title {
        font-size: 24px;
    }
    
    .whb-order-received-text {
        font-size: 14px;
    }
    
    .whb-order-details {
        padding: 20px;
    }
    
    .whb-order-details h2 {
        font-size: 18px;
    }
    
    .whb-order-details-table th,
    .whb-order-details-table td {
        padding: 10px;
        font-size: 14px;
    }
    
    .whb-thankyou-actions,
    .whb-error-actions {
        flex-direction: column;
    }
    
    .whb-btn-large {
        width: 100%;
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* ===================================
   Coupon Section
   =================================== */
.whb-coupon-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.whb-coupon-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 12px;
}

.whb-coupon-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 10px;
}

.whb-coupon-icon {
    font-size: 16px;
}

.whb-coupon-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whb-coupon-input-group {
    display: flex;
    gap: 8px;
}

.whb-coupon-input-group .whb-form-control {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
}

.whb-coupon-input-group .whb-form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.whb-coupon-message {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
}

.whb-coupon-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #86efac;
}

.whb-coupon-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.whb-coupon-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    text-transform: uppercase;
}

.whb-coupon-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.whb-applied-coupon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 12px;
}

.whb-coupon-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #166534;
    font-size: 14px;
}

.whb-coupon-badge strong {
    font-weight: 700;
    font-size: 15px;
}

.whb-coupon-badge .whb-coupon-amount {
    font-size: 13px;
    opacity: 0.8;
}

.whb-remove-coupon {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 24px;
    line-height: 1;
    padding: 0 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.whb-remove-coupon:hover {
    color: #991b1b;
    transform: scale(1.2);
}

.whb-summary-row.whb-discount {
    color: #059669;
}

.whb-summary-row.whb-discount .whb-summary-value {
    font-weight: 600;
}
