/* Trigger buttons */
.topup-trigger-btn {
    font-weight: 600;
    font-size: 12px;
    height: 34px;
    padding: 0 16px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.topup-menu-wrap {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

.topup-main-btn {
    font-weight: 600;
    font-size: 12px;
    height: 34px;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
}

.topup-main-btn .menu-caret {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.topup-menu-wrap.open .topup-main-btn .menu-caret {
    transform: rotate(180deg);
}

.topup-menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e3eaf3;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 80;
    display: none;
}

.topup-menu-wrap.open .topup-menu-dropdown {
    display: block;
}

.topup-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #2d3748;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
}

.topup-menu-item:hover {
    background: #f4f7fb;
}

.topup-menu-item i {
    width: 16px;
    text-align: center;
}

/* Overlay */
.topup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 10, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal content */
.topup-modal-content {
    background: #fff;
    border-radius: 2px;
    max-width: 780px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Modal header */
.topup-modal-header {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #E3EBF4;
    gap: 12px;
}

.topup-modal-header .title-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}

.topup-modal-header .title-icon.icon-sms {
    background: #17a2b8;
}

.topup-modal-header .title-icon.icon-whatsapp {
    background: #53d56c;
}

.topup-modal-header .title-icon.icon-payment {
    background: #6C70DC;
}

.topup-modal-header .title-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #292D32;
}

.topup-remaining {
    font-size: 13px;
    color: #6B7886;
    background: #f7f8fb;
    padding: 6px 14px;
    border-radius: 2px;
    white-space: nowrap;
}

.topup-remaining strong {
    color: #6C70DC;
    font-weight: 600;
}

.topup-remaining-group {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.topup-remaining-marketing strong {
    color: #b45309;
}

.topup-close-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #ADBFC7;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.topup-close-btn:hover {
    color: #292D32;
}

/* Modal body */
.topup-modal-body {
    padding: 25px;
}

/* Plan cards grid */
.topup-plans-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.topup-plan-card {
    width: 220px;
    background: #fff;
    box-shadow: 0 0 20px 0 rgba(107, 120, 134, 0.1);
    text-align: center;
    padding: 30px 15px 25px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    cursor: default;
    position: relative;
}

.topup-plan-card:hover {
    box-shadow: 0 4px 30px 0 rgba(107, 120, 134, 0.2);
    transform: translateY(-2px);
}

.topup-plan-name {
    font-size: 16px;
    font-weight: 500;
    color: #292D32;
    margin-bottom: 10px;
}

.topup-plan-scope {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 12px;
}

.topup-plan-scope-workflow {
    color: #28406b;
    background: #e7eefb;
}

.topup-plan-scope-marketing {
    color: #7c2d12;
    background: #fef0df;
}

.topup-plan-price {
    font-size: 36px;
    font-weight: 200;
    color: #6C70DC;
    margin-bottom: 6px;
    line-height: 1.2;
}

.topup-plan-credits {
    font-size: 14px;
    color: #6B7886;
    margin-bottom: 6px;
}

.topup-plan-desc {
    font-size: 13px;
    color: #8F9CA7;
    line-height: 1.5;
    padding: 12px 0;
    margin-top: 10px;
    border-top: 1px solid #EEEEEE;
}

.topup-buy-btn {
    width: 160px;
    height: 40px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 2px;
    margin-top: 15px;
    background: #6C70DC;
    border-color: #6C70DC;
    color: #fff;
    transition: all 0.3s ease;
}

.topup-buy-btn:hover {
    background: #5458ac;
    border-color: #5458ac;
    color: #fff;
}

/* Payment method modal */
.topup-payment-content {
    max-width: 500px;
}

.topup-payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.topup-pay-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 150px;
    background: #fff;
    border: 1px solid #E3EAF3;
    border-radius: 2px;
    box-shadow: 0 0 20px 0 rgba(107, 120, 134, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 20px;
    color: #292D32;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.topup-pay-method-btn.is-default {
    border-color: #6C70DC;
    box-shadow: 0 4px 24px 0 rgba(108, 112, 220, 0.2);
}

.topup-pay-method-btn i {
    font-size: 28px;
    color: #6C70DC;
    margin-bottom: 14px;
    display: block;
    width: auto;
}

.topup-pay-method-btn:hover {
    border-color: #6C70DC;
    box-shadow: 0 4px 30px 0 rgba(108, 112, 220, 0.15);
    color: #292D32;
    background: #fff;
}

.topup-pay-method-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.topup-pay-method-btn.processing {
    flex-direction: row;
    gap: 8px;
}

.topup-default-badge {
    margin-top: 8px;
    background: #eef0ff;
    color: #4f46e5;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    line-height: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .topup-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .topup-plan-card {
        width: 100%;
    }

    .topup-pay-method-btn {
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 16px 20px;
        gap: 12px;
    }

    .topup-pay-method-btn i {
        margin-bottom: 0;
        font-size: 22px;
    }
}
