/* --- THINKNSHOP THEME VARIABLES & OVERLAY --- */

/* Modal Overlay: No changes needed here, still centered and full screen */
.purchase-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly darker overlay for focus */
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.purchase-modal-overlay.purchase-modal-active {
    display: flex;
}

/* Modal Box: Softer shadow for a premium feel */
.purchase-modal {
    background: white;
    border-radius: 10px; /* Slightly larger border-radius */
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Softer, wider shadow */
}

/* Header: Clean, standard header */
.purchase-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.purchase-modal-title {
    margin: 0;
    font-size: 22px; /* Slightly larger title */
    font-weight: 700; /* Bolder font weight */
    color: #1A1A1A; /* Darker, more dominant text */
}

/* Close Button: Slightly more subtle color */
.purchase-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #A0A0A0; /* Lighter close icon */
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.purchase-modal-close:hover {
    color: #444;
}

/* Body & Footer: Standard padding/layout - no changes needed */
.purchase-modal-body {
    padding: 24px;
}

.purchase-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}


/* --- BUTTONS --- */
.purchase-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px; /* Slightly more rounded buttons */
    cursor: pointer;
    font-size: 14px;
    font-weight: 600; /* Bolder button text */
    transition: background-color 0.2s, transform 0.1s;
}

/* Thinknshop Primary Color (Deep Teal) */
.purchase-btn-primary {
    background-color: #0B7C8E; /* NEW Primary Teal */
    color: white;
}

.purchase-btn-primary:hover {
    background-color: #085F6B; /* Darker Teal on hover */
    transform: translateY(-1px); /* Slight lift on hover */
}

.purchase-btn-secondary {
    background-color: #A0A0A0; /* Soft gray for secondary action */
    color: white;
}

.purchase-btn-secondary:hover {
    background-color: #8C8C8C;
}

.purchase-btn-success {
    background-color: #28a745; 
    color: white;
}

.purchase-btn-success:hover {
    background-color: #1e7e34;
}

.purchase-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none; /* No lift when disabled */
}


/* --- ADDRESS CARD / SELECTION --- */
.purchase-address-card {
    border: 1px solid #ddd; /* Lighter default border */
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.purchase-address-card:hover {
    border-color: #0B7C8E; /* New primary color on hover */
    box-shadow: 0 2px 5px rgba(11, 124, 142, 0.1); /* Subtle shadow on hover */
}

.purchase-address-card.purchase-selected {
    border-width: 2px; /* Thicker border on selection */
    border-color: #0B7C8E; /* New primary color for selection */
    background-color: #F0FAFB; /* Very light, tinted background on selection */
}

.purchase-default-badge {
    background-color: #28a745;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
}


/* --- ALERTS, COUPONS, PRICE SUMMARY --- */
.purchase-alert {
    padding: 12px 16px;
    border-radius: 6px; /* Consistency in rounding */
    margin: 12px 0;
    position: relative;
}

.purchase-coupon-section {
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.purchase-coupon-input-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.purchase-coupon-input-group input {
    flex: 1;
    padding: 10px 12px; /* Slightly taller input */
    border: 1px solid #ddd;
    border-radius: 4px;
}

.purchase-coupon-input-group button {
    padding: 8px 16px;
    background-color: #0B7C8E; /* New primary color for coupon button */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.purchase-coupon-input-group button:hover {
    background-color: #085F6B;
}

.purchase-price-summary {
    margin-top: 20px;
    padding: 18px; /* Slightly more padding */
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: #fcfdfe; /* Subtle off-white for contrast */
}

.purchase-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #555; /* Softer text color for general rows */
}

.purchase-price-row.purchase-total {
    font-weight: bold;
    font-size: 20px; /* Larger total font size */
    color: #1A1A1A; /* Stronger text color for total */
    border-top: 2px solid #eee; /* Thicker dividing line */
    padding-top: 12px; /* More space above total */
    margin-top: 12px;
}


/* --- SPINNER & INPUT FOCUS --- */
.purchase-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0B7C8E; /* New primary color for spinner */
    border-radius: 50%;
    animation: purchase-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes purchase-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.purchase-input-field, .purchase-select-field {
    transition: border-color 0.2s, box-shadow 0.2s;
}

.purchase-input-field:focus, .purchase-select-field:focus {
    outline: none;
    border-color: #0B7C8E; /* New primary color for focus */
    box-shadow: 0 0 0 3px rgba(11, 124, 142, 0.2); /* Slightly wider, softer focus ring */
}