/* Checkout Wrapper */
.pb-checkout-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1f2937;
    /* Darker grey for better readability */
    line-height: 1.5;
}

/* Progress Bar */
.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 60px;
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 40px;
    /* Fixed width for alignment */
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #9ca3af;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.step-circle.active,
.step-circle.done {
    background: #44bd32;
    color: #fff;
    border-color: #44bd32;
    box-shadow: 0 4px 6px rgba(68, 189, 50, 0.2);
}

.step-label {
    position: absolute;
    top: 50px;
    /* Moved below circle */
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.02em;
}

.step.active .step-label {
    color: #111827;
    font-weight: 600;
}

.checkout-progress .step:nth-child(3) .step-label {
    opacity: 0.7;
}

.step-line {
    flex-grow: 1;
    height: 3px;
    background: #e5e7eb;
    margin: 0 10px;
    border-radius: 2px;
}

.step-line.active {
    background: #44bd32;
}

/* Top Links */
.checkout-top-links {
    margin-bottom: 40px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-link {
    color: #059669;
    /* Teal-green */
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.toggle-link:hover {
    color: #047857;
    text-decoration: underline;
}

/* Top Drawers */
.top-drawer {
    border: 1px solid #e5e7eb;
    border-top: 3px solid #44bd32;
    padding: 25px;
    background: #fff;
    margin-bottom: 30px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.coupon-input-group {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin-top: 15px;
}

.coupon-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.coupon-input-group button.button {
    background: #374151;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

/* Layout */
.pb-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    /* Fixed width for sidebar */
    gap: 40px;
    align-items: start;
}

@media (max-width: 960px) {
    .pb-checkout-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .step-label {
        font-size: 11px;
    }
}

/* Left Column Form */
.pb-checkout-left h2,
.pb-checkout-left h3 {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 25px;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #f3f4f6;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 24px;
    width: 100%;
}

.form-group.half {
    width: 50%;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group.half {
        width: 100%;
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.required {
    color: #ef4444;
}

.pb-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fff;
    box-sizing: border-box;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pb-input:focus {
    border-color: #44bd32;
    outline: none;
    box-shadow: 0 0 0 3px rgba(68, 189, 50, 0.15);
}

.pb-input::placeholder {
    color: #9ca3af;
}

.static-value {
    font-size: 15px;
    color: #374151;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* Right Column: Your Order (Sticky) */
.pb-checkout-right {
    position: sticky;
    top: 20px;
}

.your-order-container {
    background: white;
    padding: 0;
    /* Removing internal padding to let children handle it */
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.your-order-container h3 {
    margin: 0;
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 600;
    background: #1f2937;
    /* Dark header */
    color: #fff;
}

.order-card {
    padding: 25px;
    background: #fff;
    color: #374151;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.order-table td {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    vertical-align: top;
}

.order-table tr:first-child td {
    border-top: none;
}

.order-table td small.text-muted {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}

.text-right {
    text-align: right;
}

.total-row td {
    font-weight: 700;
    font-size: 20px;
    color: #111827;
    padding-top: 20px;
    border-bottom: none;
    border-top: 2px solid #e5e7eb;
}

/* Tip Sections */
.tip-selection-mini {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.tip-selection-mini small {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
}

.tip-pills-mini {
    display: flex;
    gap: 8px;
}

.tip-pill {
    flex: 1;
    font-size: 13px;
    padding: 8px 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s;
}

.tip-pill:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.tip-pill.selected {
    background: #1f2937;
    color: #fff;
    border-color: #1f2937;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Payment Methods */
.payment-methods-radio {
    margin-bottom: 25px;
    background: #f9fafb;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e5e7eb;
}

.pm-radio-option {
    margin-bottom: 15px;
}

.pm-radio-option:last-child {
    margin-bottom: 0px;
}

.pm-radio-option label {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    color: #111827;
}

.pm-radio-option input[type="radio"] {
    accent-color: #44bd32;
    transform: scale(1.1);
    margin: 0;
}

.pm-content {
    margin-top: 12px;
    background: #fff;
    padding: 20px;
    /* More padding */
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Outer shadow */
}

#card-element-container {
    /* Legacy removal */
    display: none;
}

/* Split Field Layout */
.stripe-split-fields {
    margin-top: 5px;
}

.stripe-field-row {
    display: flex;
    gap: 15px;
}

.stripe-field-group {
    margin-bottom: 15px;
    width: 100%;
}

.stripe-field-group.half {
    width: 50%;
}

.stripe-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.stripe-input-wrapper {
    position: relative;
}

.stripe-input-field {
    padding: 12px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s;
    height: 46px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stripe-input-field.StripeElement--focus {
    border-color: #44bd32;
    box-shadow: 0 0 0 3px rgba(68, 189, 50, 0.15);
}

/* Icons in Label */
.icons {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.icons img {
    height: 20px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.2s;
}

.pm-radio-option input:checked+label .icons img {
    filter: none;
    opacity: 1;
}

/* Card Number Input - Reset Padding */
#card-number-element {
    padding-right: 12px;
    /* Standard padding */
}

.pm-content p.small-text {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.icons {
    margin-left: auto;
    font-size: 18px;
    filter: grayscale(100%);
    opacity: 0.6;
}

.pm-radio-option input:checked+label .icons {
    filter: none;
    opacity: 1;
}

/* Terms */
.terms-section {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 25px;
    line-height: 1.6;
}

.terms-section a {
    color: #44bd32;
    text-decoration: none;
    font-weight: 500;
}

.terms-section a:hover {
    text-decoration: underline;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #44bd32;
}

/* Place Order Button */
.place-order-btn {
    display: block;
    width: 100%;
    background: #44bd32;
    background: linear-gradient(to bottom, #4cd137, #44bd32);
    color: #fff;
    border: none;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px -1px rgba(68, 189, 50, 0.3);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.place-order-btn:hover {
    background: linear-gradient(to bottom, #44bd32, #3da62b);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(68, 189, 50, 0.4);
}

.place-order-btn:active {
    transform: translateY(0);
}

.place-order-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.error-text {
    color: #dc2626;
    margin-top: 15px;
    font-size: 14px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    padding: 10px;
    border-radius: 6px;
    display: none;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Security Trust Badge Wrapper */
.security-badge {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.security-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}