/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/
.woocommerce-additional-fields {
    display: none;
}

ul.wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

li.wc_payment_method {
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

li.wc_payment_method:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

input.input-radio {
    display: none;
}

li.wc_payment_method label {
    font-size: 16px;
    font-weight: 600;
    margin-left: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #333;
    margin-bottom: 0px;
}

li.wc_payment_method img {
    margin-left: 10px;
    height: 20px;
    width: auto;
}

/* Active payment method */
input.input-radio:checked+label {
    color: #0071e3;
    font-weight: bold;
}

input.input-radio:checked+label::before {
    content: '\2713';
    font-size: 18px;
    color: #0071e3;
    margin-right: 10px;
    font-weight: bold;
}

div.payment_box {
    ;
    display: none;
}

li.wc_payment_method input:checked+label+div.payment_box {
    display: block;
}

/* Hover effect for the label */
li.wc_payment_method label:hover {
    color: #0071e3;
    text-decoration: underline;
}

/* Focus effect for the radio button */
input.input-radio:focus+label {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
}


.payment_box.payment_method_bacs {
    display: none !important;
}

.selector-header {
    text-align: center;
    margin-bottom: 40px;
}

.selector-header h2 {
    color: #333;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.2;
}

.selector-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* ====== Tokens ====== */
:root {
    --bg: #F6F3FF;
    --card-bg: #ffffff;
    --text: #1F2233;
    --muted: #7A7F8C;
    --stroke: #E9E7F7;

    --primary: #0babcb;
    --primary-2: #0babcb;
    --accent: #FFD34D;
    --success: #22C55E;
    --btn-text: #ffffff;
    --radius-xl: 24px;
    --radius: 14px;
    --shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.packages-checkout-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

@media (max-width: 1024px) {
    .packages-checkout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .packages-checkout-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }
}

.feature-item img.feature-icon {
    width: 20px;
    height: 20px;
}

.package-group,
.egift-item {
    background: var(--card-bg);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.package-group:hover,
.egift-item:hover {
    transform: translateY(-4px);
}

.package-header {
    position: relative;
    padding: 28px 28px 18px;
    text-align: center;
}

.package-name {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.package-description {
    margin: 0 auto;
    color: #082a5e;
    line-height: 1.5;
    font-size: 14px;
}

.package-price-from {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary);
}

/* ====== Features ====== */
.package-features {
    padding: 0px 24px 18px;
}

.package-features h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #082a5e;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.features-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: var(--text);
}

.feature-item.more-features {
    color: #082a5e;
}

/* ====== Options (khu chọn thời hạn) ====== */
.package-options {
    padding: 18px 24px 24px;
    margin-top: auto;
}

.package-options h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #082a5e;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-weight: 700;
}

.package-options .options-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

/* Chữ gọn lại */
.package-options .option-duration {
    font-weight: 700;
    font-size: 14px;
}

.package-options .option-price .price-amount {
    font-weight: 800;
    font-size: 14px;
}

/* Nút nhỏ, không chiếm full width */
.package-options .select-option-btn {
    grid-column: auto;
    /* bỏ full width */
    margin: 0;
    padding: 8px 12px;
    width: auto;
    min-width: unset;
    line-height: 1;
    border-radius: 10px;
}

/* Trạng thái đã chọn vẫn nổi bật nhưng gọn */
.package-options .product-option.in-cart {
    background: #F3F0FF;
    border-color: #7C67FF;
    box-shadow: 0 0 0 2px rgba(124, 103, 255, .12) inset;
}

/* Responsive: tablet 2 cột, mobile 1 cột */
@media (max-width: 1024px) {
    .package-options .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .package-options .options-grid {
        grid-template-columns: 1fr;
    }
}

.product-option {
    background: #FBFAFF;
    border: 1px solid #EAE6FF;
    border-radius: var(--radius);
    padding: 8px 5px;
    text-align: center;
    cursor: pointer;
    transition: .4s all;
}

.product-option:hover {
    transform: translateY(-5px);
}

.product-option.in-cart {
    background: #F3F0FF;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(124, 103, 255, .15) inset;
}

.option-duration {
    font-weight: 700;
    color: var(--text);
}

.option-price .price-amount {
    font-weight: 800;
}

/* Nút */
.select-option-btn {
    grid-column: 1/-1;
    width: 100%;
    margin-top: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--primary);
    background: #fff;
    color: var(--primary);
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .05s ease;
}

.select-option-btn:hover {
    background: var(--primary);
    color: var(--btn-text);
}

.select-option-btn:active {
    transform: scale(.99);
}

.select-option-btn.selected,
.select-option-btn:disabled {
    background: var(--primary);
    color: var(--btn-text);
    border-color: var(--primary);
    opacity: 1;
}

.package-group.featured,
.packages-checkout-grid>.package-group:nth-child(2) {
    background: linear-gradient(100.88deg, #EBFFFE 0.6%, #FFF6EB 100%);
    border: none;
    color: #082a5e;
}

.package-group.featured .package-name {
    color: #082a5e;
}

.package-group.featured .package-description {
    color: #082a5e;
}

.package-group.featured .package-price-from {
    color: #082a5e;
}

.package-group.featured .package-price-from::after {
    background: rgba(255, 255, 255, .25);
}

/* check icon trên nền tím */
.package-group.featured .feature-icon,
.packages-checkout-grid>.package-group:nth-child(2) .feature-icon {
    background: rgba(255, 255, 255, .18);
    color: #082a5e;
}

.package-group.featured .feature-item,
.packages-checkout-grid>.package-group:nth-child(2) .feature-item {
    color: #082a5e;
}

.package-group.featured .product-option,
.packages-checkout-grid>.package-group:nth-child(2) .product-option {
    color: #082a5e;
}

.package-group.featured .option-duration,
.packages-checkout-grid>.package-group:nth-child(2) .option-duration {
    color: #082a5e;
}

.package-group.featured .select-option-btn,
.packages-checkout-grid>.package-group:nth-child(2) .select-option-btn {
    background: #fff;
    color: #4F35E6;
    border-color: #fff;
}

.package-group.featured .select-option-btn:hover,
.packages-checkout-grid>.package-group:nth-child(2) .select-option-btn:hover {
    background: #F2EDFF;
    color: #4F35E6;
}

.package-group.featured .select-option-btn.selected,
.packages-checkout-grid>.package-group:nth-child(2) .select-option-btn.selected {
    background: #2B1AC8;
    color: #fff;
    border-color: transparent;
}

.package-group.featured .package-header::before,
.packages-checkout-grid>.package-group:nth-child(2) .package-header::before {
    content: "Đề xuất";
    background: var(--accent);
    color: #082a5e;
    font-weight: 900;
    font-size: 16px;
    border-radius: 10px;
    padding: 0.12rem 1.75rem .12rem .4rem;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATYAAABACAMAAACnbqvzAAAAqFBMVEUAAAD/yir/yir/yir8yiT/yir/yir/yyn/yin/yyr/yir8xCL/yyn/yyv/yyvsswT/yyr/ySr/yyrsswP/yir/yin7xCD/yij/xib/yirtswPtswPuswP/yyruswP/ySr/ySn/zCr4wB7/1SvtswPtswP/yivsswL/yin/yirttAPtswPsswP/ySn/ySr/yirtswP6wx71vRTvtgjvtQb3wBfyuQzxuAzF3Li2AAAAL3RSTlMA9udeCvrrLbiukQ/LZk4/8dvXwJp9JyAb3ci8tIyBb1E3GAb55N7Ov6ScZVFQPaW2iPIAAAGWSURBVHja7dnnUgIxFIbhD7bvUgRpdoq9JTS9/ztTZ1A5RJjk+Pd7LuGdk+TsLBxxq8w7aWLo03zxvlzZm7vHpxEOqKKiZmhjvbK/zp6xR9w/MvRtvrTSaRt/adYN/VhY1yUco4YhWc11FkOacNTcaq7TCtsivgTb5nafc1HN0Laldbn324SzJqztftcDbIx4r/kNmzymfEOluT2ovdnXDAkLe9AxvsQ8ojtW1mPc+oYk63DHreJ3qMfVJrW5srnerMe4FYaEFB5ibro7cnhoGZIu4KE0JEXwkBuSMnjoGBIS+EgNCQ344J+9HT34MCRdMZvGK7NpVMymcAtmUyiYTaPPbBotZtMYMpvCEZhN4Z7ZNEpm04iYTSNjNoVkxmwKDTCbwgWzabwwm0ItZjaFAsymMGY2hS6YTSFiNoUTMJtCk9kUujNmC5dkYLZwV2C2cDmYLVx9ymzh0gzMFqyegdmC1QdgtmAnAzBbsF4MZguVtgBmC1VMwWyBkocMYLYwtXIIMFuQTm9cAczmq5Z287I5xP98AJpjmroc4IUQAAAAAElFTkSuQmCC) no-repeat 100%;
    background-size: cover;
    font-weight: 500;
    position: absolute;
    top: -.12rem;
    left: 0;
    border-radius: .24rem 0 .32rem 0;
    width: 100px;
}

.product-option.featured {
    border-color: #28a745;
    background: #f8fff9;
}

.product-option.selected {
    border-color: #007cba;
    background: #e6f3ff;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.package-purchase {
    padding: 0px 18px 18px;
    text-align: center;
}

.purchase-btn,
.purchase-btn-egift {
    background: #007cba;
    color: white;
    border: none;
    padding: 5px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100%;
    margin: 0px !important;
}

.purchase-btn:hover:not(:disabled) {
    background: #005a8b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.purchase-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.package-group.has-selection .purchase-btn {
    background: #28a745;
}

.package-group.has-selection .purchase-btn:hover:not(:disabled) {
    background: #218838;
}

.login-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.login-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.login-modal p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.5;
}

.login-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.login-modal-buttons button {
    padding: 0px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    margin: 0px !important;
    flex: 1;
}

.btn-login {
    background: #007cba;
    color: white;
    border: none;
}

.btn-login:hover {
    background: #082a5e;
}

.btn-cancel {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-cancel:hover {
    background: #e9ecef;
}

@media (max-width: 768px) {
    .products-checkout-grid {
        flex-direction: column;
        align-items: center;
    }

    .checkout-product-card {
        width: 100%;
        max-width: 350px;
    }

    .checkout-product-card.featured {
        transform: none;
    }

    .selector-header h2 {
        font-size: 24px;
    }

    .login-modal-buttons {
        flex-direction: column;
    }
}

.tab-navigation-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-navigation {
    background: #F3F6F9;
    display: inline-flex;
    margin: 0 auto;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #082a5e;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    min-width: 150px;
    text-align: center;
    outline: none;
    margin: 0px;
}

.tab-btn.active {
    color: #fff;
    background: #082a5e;
}

.tab-btn:hover:not(.active) {
    color: #495057;
    background: rgba(255, 255, 255, 0.7);
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 16px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
}

.tab-btn[data-tab="package"]::before {
    background: linear-gradient(135deg, #007cba, #0056b3);
}

.tab-btn[data-tab="egift"]::before {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.tab-btn.active::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.tab-btn.active[data-tab="package"] {
    padding-left: 48px;
}

.tab-btn.active[data-tab="egift"] {
    padding-left: 48px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 30px;
    }

    .tab-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    .tab-btn.active[data-tab="package"],
    .tab-btn.active[data-tab="egift"] {
        padding-left: 20px;
    }

    .tab-btn::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .tab-navigation {
        padding: 4px;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-width: unset;
    }
}

.egift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.egift-item {
    padding: 28px 28px 18px;
    text-align: center;
}

.egift-item.in-cart {
    background: linear-gradient(100.88deg, #EBFFFE 0.6%, #FFF6EB 100%);
    border: none;
    color: #082a5e;
}

.egift-name {
    font-size: 24px;
    font-weight: 700;
    color: #082a5e;
    margin: 0;
}

.egift-price {
    margin-bottom: 16px;
}

.egift-price .price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #007cba;
}

.egift-price .original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.purchase-btn-egift:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-2px);
}

.purchase-btn-egift:disabled,
.purchase-btn-egift.in-cart {
    background: #28a745;
    cursor: not-allowed;
}

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

@media only screen and (max-width: 48em) {
    .egift-name {
        font-size: 18px;
    }

    .egift-price .price-amount {
        font-size: 24px;
    }
}

/* Method Selection Screen Styles */
.method-selection-screen {
    display: block;
}

.method-selection-screen.hidden {
    display: none;
}

.method-selection-content {
    text-align: center;
    padding: 20px 0;
}

.method-instruction {
    margin-bottom: 30px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.method-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.method-text {
    flex: 1;
    text-align: center;
}

/* Package Card Styles */
.package-card {
    width: 100%;
    background: linear-gradient(100.88deg, #EBFFFE 0.6%, #FFF6EB 100%);
    border-radius: 15px;
    padding: 0;
    margin-bottom: 30px;
    overflow: hidden;
}

.package-header {
    padding: 20px 25px 15px;
}

.package-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.package-body {
    padding: 20px 25px;
}

.package-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #ececec;
}

.package-info:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.info-label {
    font-weight: 500;
    opacity: 0.9;
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    font-size: 15px;
}

.package-name {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.package-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.status-active {
    background: rgba(46, 204, 113, 0.2);
}

.status-warning {
    background: rgba(241, 196, 15, 0.2);
}

.status-expired {
    background: rgba(231, 76, 60, 0.2);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.status-active .status-indicator {
    background: #2ecc71;
}

.status-warning .status-indicator {
    background: #f1c40f;
}

.status-expired .status-indicator {
    background: #e74c3c;
}

/* Other Info Styles */
.other-info {
    margin-top: 20px;
}

.profile-field {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-field strong {
    color: #333;
    font-weight: 600;
}

/* No Package Content Styles */
.no-package-content {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.no-package-content p {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 500;
}

.no-package-content small {
    opacity: 0.7;
    font-size: 14px;
}

.debug-data {
    margin-top: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.debug-data summary {
    padding: 15px;
    background: #f5f5f5;
    cursor: pointer;
    font-weight: 600;
    border: none;
    outline: none;
}

.debug-data summary:hover {
    background: #ebebeb;
}

.debug-data pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    margin: 0;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
}

/* Loading & Error Styles */
#profile-loading {
    padding: 40px 20px;
    text-align: center;
    font-style: italic;
    color: #666;
    background: #f9f9f9;
    border-radius: 10px;
}

#profile-error {
    padding: 20px;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    color: #c53030;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .package-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .profile-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .package-card {
        margin: 0 -10px 20px -10px;
    }
}