/**
 * F-Checkout Styles
 * CSS cho trang Checkout tùy chỉnh
 */

/* ==========================================
   CHECKOUT CARD
   ========================================== */
.f-checkout-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
}

.f-summary-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
}

.f-label-caps {
    font-size: 11px;
    font-weight: 700;
    color: #8a8a8a;
    letter-spacing: 0.5px;
    margin: 25px 0 10px;
    text-transform: uppercase;
}

/* ==========================================
   SUMMARY ROWS
   ========================================== */
.f-summary-rows .f-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.f-discount-text {
    color: #234e1e;
}

.f-discount-text strong {
    color: #234e1e;
}

/* ==========================================
   SHIPPING METHOD
   ========================================== */
.f-shipping-checkout-container {
    margin-bottom: 20px;
}

.f-shipping-header {
    margin-bottom: 12px;
    font-weight: 600;
    color: #4b5563;
}

.f-shipping-method-card {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background: #fff;
    position: relative;
}

.f-shipping-method-card.active {
    border: 2px solid #234e1e;
    background: #fcfdfc;
}

/* Custom Radio */
.f-radio-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    margin-right: 15px;
    flex-shrink: 0;
}

.f-shipping-radio-trigger {
    opacity: 0;
    position: absolute;
    cursor: pointer;
}

.f-custom-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 50%;
}

.f-shipping-method-card.active .f-custom-checkmark {
    border-color: #234e1e;
}

.f-custom-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #234e1e;
}

.f-shipping-method-card.active .f-custom-checkmark:after {
    display: block;
}

/* Method Text */
.f-method-text {
    flex-grow: 1;
}

.f-method-title-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 2px;
}

.f-method-label {
    font-size: 15px;
    color: #111827;
    font-weight: 700;
}

.f-method-cost {
    font-size: 15px;
    color: #234e1e;
    font-weight: 700;
}

.f-method-eta {
    font-size: 12px;
    color: #6b7280;
    display: block;
}

.f-green-text {
    color: #234e1e;
    font-weight: 700;
}

/* ==========================================
   COUPON SECTION
   ========================================== */
.f-coupon-checkout-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.f-coupon-input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.f-cp-input {
    flex: 1;
    padding: 0 10px;
    border: 2px solid #234e1e;
    border-radius: 6px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 500;
}

.f-cp-input::placeholder {
    color: #a0aec0;
    text-transform: uppercase;
}

.f-cp-btn {
    background-color: var(--f-green);
    color: #fff;
    border: none;
    padding: 0 25px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.f-cp-btn:hover {
    background-color: #7d8b7a;
}

/* Applied Coupon */
.f-applied-coupons-container {
    margin-bottom: 5px;
}

.f-applied-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f7ef;
    border: 1px solid #d1e4cf;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.f-applied-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.f-applied-left .fa-circle-check {
    color: #2e7d32;
    font-size: 20px;
}

.f-applied-info strong {
    display: block;
    color: #234e1e;
    font-size: 15px;
    line-height: 1.2;
}

.f-applied-info span {
    font-size: 12px;
    color: #555;
}

.f-remove-coupon-checkout {
    color: #8a99ad;
    font-size: 13px;
    text-decoration: underline;
    font-weight: 500;
}

.f-remove-coupon-checkout:hover {
    color: #ff5252;
}

/* ==========================================
   PAYMENT METHOD
   ========================================== */
.f-payment-section-checkout {
    margin-top: 30px;
}

.f-pay-card {
    display: flex;
    align-items: flex-start;
    padding: 18px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.f-pay-card.active {
    border: 2px solid #234e1e;
    background: #fff;
}

/* Pay Radio */
.f-pay-radio {
    margin-right: 15px;
    margin-top: 2px;
}

.f-pay-trigger-checkout {
    accent-color: #234e1e;
    width: 18px;
    height: 18px;
}

.f-pay-content strong {
    font-size: 15px;
    color: #111;
    font-weight: 700;
    display: block;
}

.f-pay-desc {
    font-size: 13px;
    color: #757575;
    line-height: 1.5;
    margin-top: 8px;
    font-style: italic;
}

/* ==========================================
   TOTAL DISPLAY
   ========================================== */
.f-total-display {
    border-top: 1px solid #eee;
    margin-top: 25px;
    padding-top: 25px;
}

.f-total-display .f-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.f-total-label {
    font-size: 18px;
    font-weight: 700;
    color: #234e1e;
}

.f-total-price {
    font-size: 28px;
    font-weight: 700;
    color: #234e1e;
}

.f-total-display small {
    color: #aaa;
    font-size: 11px;
    display: block;
    margin-top: 4px;
}

/* ==========================================
   CHECKOUT ACTIONS
   ========================================== */
.f-checkout-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 35px;
    gap: 20px;
}

.f-btn-back {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    white-space: nowrap;
}

.f-btn-back:hover {
    color: #111;
}

.f-btn-place {
    background: #234e1e;
    color: #fff;
    border: none;
    padding: 18px 45px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    flex-grow: 1;
    box-shadow: 0 4px 12px rgba(35, 78, 30, 0.2);
    transition: transform 0.1s ease, background 0.2s;
    text-align:center;
}

.f-btn-place:active {
    transform: scale(0.98);
}

/* ==========================================
   LEGAL TEXT
   ========================================== */
.f-checkout-legal {
    margin-top: 30px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
}

.f-checkout-legal a {
    color: #111;
    text-decoration: underline;
    font-weight: 600;
}

.f-legal-bold {
    font-weight: 700;
    color: #374151;
    margin-top: 10px;
}

.f-legal-italic {
    font-style: italic;
    color: #9ca3af;
    margin-top: 5px;
}

/* ==========================================
   MOBILE RESPONSIVE - CHECKOUT SUMMARY
   ========================================== */
@media (max-width: 767px) {
    .f-checkout-card {
        padding: 16px;
        border-radius: 10px;
    }

    .f-summary-title {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .f-summary-rows .f-row {
        font-size: 13px;
    }

    /* Shipping methods stack better on mobile */
    .f-shipping-method-card {
        padding: 12px;
    }

    .f-method-title-row {
        flex-direction: row;
        gap: 2px;
    }

    .f-method-label {
        font-size: 14px;
    }

    .f-method-cost {
        font-size: 14px;
    }

    .f-radio-wrapper {
        margin-right: 10px;
    }

    /* Coupon input */
    .f-coupon-input-group {
        flex-direction: column;
        gap: 8px;
    }

    .f-cp-btn {
        padding: 12px 20px;
        width: 100%;
        text-align: center;
    }

    .f-cp-input {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Applied coupon */
    .f-applied-item {
        padding: 12px;
        flex-direction: row;
        gap: 10px;
        align-items: flex-start;
    }

    .f-applied-info strong {
        font-size: 13px;
    }

    .f-applied-info span {
        font-size: 11px;
    }

    /* Payment */
    .f-pay-card {
        padding: 14px 12px;
    }

    .f-pay-radio {
        margin-right: 10px;
    }

    .f-pay-content strong {
        font-size: 14px;
    }

    .f-pay-desc {
        font-size: 12px;
    }

    /* Total */
    .f-total-display {
        margin-top: 20px;
        padding-top: 20px;
    }

    .f-total-label {
        font-size: 16px;
    }

    .f-total-price {
        font-size: 22px;
    }

    /* Actions */
    .f-checkout-actions {
        flex-direction: column-reverse;
        gap: 12px;
        margin-top: 25px;
    }

    .f-btn-place {
        width: 100%;
        padding: 16px 30px;
        font-size: 15px;
        text-align: center;
    }

    .f-btn-back {
        justify-content: center;
        width: 100%;
        padding: 10px;
    }

    /* Legal */
    .f-checkout-legal {
        margin-top: 20px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .f-checkout-card {
        padding: 14px;
    }

    .f-summary-title {
        font-size: 16px;
    }

    .f-label-caps {
        font-size: 10px;
    }

    .f-total-price {
        font-size: 20px;
    }

    .f-shipping-method-card {
        padding: 10px;
    }

    .f-method-label,
    .f-method-cost {
        font-size: 13px;
    }
}

/* ==========================================
   PHONE PREFIX BADGE (Country Calling Code)
   ========================================== */
.f-phone-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s;
    height: 40px;
    width: 100%;
}

.f-phone-input-wrap:focus-within {
    border-color: #234e1e;
    box-shadow: 0 0 0 1px #234e1e;
}

.f-phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f3f4f6;
    border-right: 1px solid #d1d5db;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    user-select: none;
    min-width: 50px;
    justify-content: center;
}

.f-phone-input-wrap input[type="tel"],
.f-phone-input-wrap input[type="text"],
.f-phone-input-wrap .input-text {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    flex: 1;
    padding: 10px 12p
    font-size: 14px;
    background: transparent;
    min-width: 0;
}

.f-phone-input-wrap input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .f-phone-prefix {
        padding: 0 8px;
        font-size: 13px;
        min-width: 42px;
    }

    .f-phone-input-wrap input[type="tel"],
    .f-phone-input-wrap input[type="text"],
    .f-phone-input-wrap .input-text {
        padding: 8px 10px;
        font-size: 13px;
    }
}

.f-phone-input-wrap {
	    height: 44px !important;
	    border-radius: 4px !important;
}
.f-phone-input-wrap input#billing_phone_filed,
.f-phone-input-wrap input#shipping_gift_phone {
	    height: 100% !important;
	    padding: 0 12px !important;
}
}
}
