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

.modal-content {
    border-radius: 13px;
}

.modal-body {
    font-size: 15px;
}

/* Popup styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup-overlay-subscription{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup-billing {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
}

.popup-billing-2{
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
    width: 100%;
}

.popup-billing-2 a {
    width: 50%;
    box-sizing: border-box;
    border: 0.1px solid
}

.regist-btn {
    background-color: #2272FF;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.coupon-input-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.coupon-input {
    flex: 1;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}
.coupon-message {
    width: 100%;
    margin-top: 5px;
    font-size: 12px;
}
.coupon-message.error {
    color: #FF0000;
}
.coupon-message.success {
    color: #2272FF;
}
.coupon-input:focus {
    border-color: #2272FF;
    outline: none;
    box-shadow: 0 0 5px rgba(34, 114, 255, 0.3);
}

.gap-day {
    margin: 10px 0;
    color: #FF0000;
}
.coupon-row {
    display: none;
}

.coupon-row .price {
    font-weight: 700;
    font-size: 14px;
}

#couponCode {
    color: #AAAAAA;
    font-size: 0.8rem;
}

.next-pay-date,
.next-billing-date {
    color: #AAAAAA;
    font-size: 14px;
}

.next-billing-date > td {
    text-align: right;
}

/* 구독 중지 알림 팝업 스타일 */
.popup-subscription-stop,
.popup-subscription-card-add {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
    overflow: hidden;
}

.popup-subscription-stop .popup-header,
.popup-subscription-card-add .popup-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
}

.popup-subscription-stop .popup-header h3,
.popup-subscription-card-add .popup-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.popup-subscription-stop .close-btn,
.popup-subscription-card-add .close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.popup-subscription-stop .close-btn:hover,
.popup-subscription-card-add .close-btn:hover {
    color: #555;
}

.popup-subscription-stop .popup-content,
.popup-subscription-card-add .popup-content {
    padding: 20px;
}

.popup-subscription-stop .popup-content p,
.popup-subscription-card-add .popup-content p {
    margin: 0 0 15px;
    line-height: 1.5;
    color: #555;
    text-align: center;
}

.popup-subscription-stop .popup-content p:first-child,
.popup-subscription-card-add .popup-content p:first-child {
    font-weight: 500;
    font-size: 16px;
    color: #333;
}

.popup-subscription-stop .popup-content a,
.popup-subscription-card-add .popup-content a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
}

.popup-subscription-stop .popup-content a:hover,
.popup-subscription-card-add .popup-content a:hover {
    text-decoration: underline;
}

.popup-subscription-stop .popup-footer,
.popup-subscription-card-add .popup-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    background-color: #f9f9f9;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.popup-subscription-stop .btn-primary,
.popup-subscription-card-add .btn-primary {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    min-width: 100px;
    transition: background-color 0.2s;
    flex: 2;
}

.popup-subscription-stop .btn-secondary,
.popup-subscription-card-add .btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    transition: all 0.2s;
    flex: 1;
}

.popup-subscription-stop .btn-primary:hover,
.popup-subscription-card-add .btn-primary:hover {
    background-color: #0d8aee;
}

.popup-subscription-stop .btn-secondary:hover,
.popup-subscription-card-add .btn-secondary:hover {
    background-color: #e9e9e9;
    border-color: #ccc;
}

@media (max-width: 767px) {
    .popup-subscription-stop,
    .popup-subscription-card-add {
        width: 95%;
        max-width: 350px;
    }

    .popup-subscription-stop .popup-header h3,
    .popup-subscription-card-add .popup-header h3 {
        font-size: 16px;
    }

    .popup-subscription-stop .popup-content p,
    .popup-subscription-card-add .popup-content p {
        font-size: 14px;
    }

    .popup-subscription-stop .popup-content p:first-child,
    .popup-subscription-card-add .popup-content p:first-child {
        font-size: 15px;
    }

    .popup-subscription-stop .popup-footer,
    .popup-subscription-card-add .popup-footer {
        flex-direction: column;
    }

    .popup-subscription-stop .btn-primary,
    .popup-subscription-stop .btn-secondary,
    .popup-subscription-card-add .btn-primary,
    .popup-subscription-card-add .btn-secondary {
        width: 100%;
        margin-bottom: 8px;
    }

    .popup-subscription-stop .btn-secondary,
    .popup-subscription-card-add .btn-secondary {
        order: 2;
    }

    .popup-subscription-stop .btn-primary,
    .popup-subscription-card-add .btn-primary {
        order: 1;
    }
}

.popup-content p {
    font-size: 18px;
    font-weight: bold; 
    color: #000000; 
    text-align: center; 
    margin-bottom: 0;
}

.popup-content div {
    margin-top: 6px; 
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

.popup-divider {
    width: 100%; 
    margin-top: 20px; 
    margin-bottom: 16px;
}

.popup-btn-billing {
    display: block; 
    background-color: #1485FF; 
    color: white; 
    text-align: center; 
    padding: 10px; 
    border-radius: 5px; 
    text-decoration: none; 
    font-weight: bold;
    cursor: pointer;
}

.popup-btn-billing-cancel {
    display: block;
    color: #AAAAAA;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.popup-disclaimer {
    background-color: #F8F8F8; 
    font-size: 10px;
    padding: 20px;
}

/* Style for the card registration button next to payment method */
h4 .popup-btn-billing {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    font-size: 12px;
    vertical-align: middle;
}

.regist-btn {
    background-color: #2272FF;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.coupon-input-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.coupon-input {
    flex: 1;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}
.coupon-message {
    width: 100%;
    margin-top: 5px;
    font-size: 12px;
}
.coupon-message.error {
    color: #FF0000;
}
.coupon-message.success {
    color: #2272FF;
}
.coupon-input:focus {
    border-color: #2272FF;
    outline: none;
    box-shadow: 0 0 5px rgba(34, 114, 255, 0.3);
}

.gap-day {
    margin: 10px 0;
    color: #FF0000;
}
.coupon-row {
    display: none;
}

.coupon-row .price {
    font-weight: 700;
    font-size: 14px;
}

#couponCode {
    color: #AAAAAA;
    font-size: 0.8rem;
}

.next-pay-date,
.next-billing-date {
    color: #AAAAAA;
    font-size: 0.8rem;
}

.next-billing-date > td {
    text-align: right;
}