@charset "utf-8";

/* ============================================
   Point Charge Modal - point-charge-modal.css
   ============================================ */

/* -------------------------------------------
   Modal Overlay
   ------------------------------------------- */
.pc-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pc-modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px;
}

/* -------------------------------------------
   Modal Card
   ------------------------------------------- */
.pc-modal {
    background-color: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    margin: auto;
    animation: pcModalFadeIn 0.25s ease-out;
}

@keyframes pcModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------------------------------------
   Modal Header
   ------------------------------------------- */
.pc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.pc-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.pc-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background-color: transparent;
    font-size: 24px;
    color: #999999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.pc-modal-close:hover {
    background-color: #f5f5f5;
    color: #333333;
}

/* -------------------------------------------
   Modal Body
   ------------------------------------------- */
.pc-modal-body {
    padding: 24px;
}

/* -------------------------------------------
   Balance Section
   ------------------------------------------- */
.pc-balance-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.pc-balance-label {
    font-size: 14px;
    color: #666666;
    font-weight: 500;
}

.pc-balance-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* -------------------------------------------
   Section Common
   ------------------------------------------- */
.pc-section {
    margin-bottom: 24px;
}

.pc-section-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 10px;
}

/* -------------------------------------------
   Preset Amount Grid (2x2)
   ------------------------------------------- */
.pc-amount-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.pc-amount-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.pc-amount-btn:hover {
    border-color: #2196F3;
    color: #2196F3;
    background-color: #f0f7ff;
}

.pc-amount-btn.active {
    background-color: #2196F3;
    border-color: #2196F3;
    color: #ffffff;
}

.pc-amount-btn.active .pc-bonus-badge {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* -------------------------------------------
   Bonus Badge on Amount Buttons
   ------------------------------------------- */
.pc-bonus-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 10px;
    background-color: #FFF3E0;
    color: #E65100;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

/* -------------------------------------------
   Bonus Tier Info
   ------------------------------------------- */
.pc-bonus-tier-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 8px 10px;
    background-color: #FFF8E1;
    border-radius: 6px;
    font-size: 12px;
    color: #795548;
}

.pc-tier-label {
    font-weight: 600;
    color: #E65100;
    margin-right: 2px;
}

.pc-tier-item {
    white-space: nowrap;
}

.pc-tier-item b {
    color: #E65100;
    font-weight: 700;
}

/* -------------------------------------------
   Bonus Row in Summary
   ------------------------------------------- */
.pc-bonus-row span:last-child {
    color: #E65100 !important;
    font-weight: 700 !important;
}

.pc-bonus-text {
    color: #E65100;
    font-weight: 700;
}

/* -------------------------------------------
   Terms / Notice Section
   ------------------------------------------- */
.pc-terms-section {
    margin-bottom: 20px;
    padding: 14px 16px;
    background-color: #f5f5f5;
    border-radius: 8px;
    border-left: 3px solid #9E9E9E;
}

.pc-terms-title {
    font-size: 12px;
    font-weight: 700;
    color: #555555;
    margin-bottom: 8px;
}

.pc-terms-list {
    margin: 0;
    padding: 0 0 0 16px;
    list-style: none;
}

.pc-terms-list li {
    position: relative;
    font-size: 11px;
    color: #777777;
    line-height: 1.6;
    padding-left: 8px;
}

.pc-terms-list li::before {
    content: '\2022';
    position: absolute;
    left: -8px;
    color: #999999;
}

.pc-terms-list li b {
    color: #555555;
    font-weight: 700;
}

/* -------------------------------------------
   Custom Amount Input Row
   ------------------------------------------- */
.pc-custom-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pc-custom-input {
    flex: 1;
    height: 44px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 15px;
    color: #333333;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -moz-appearance: textfield;
    background-color: #ffffff;
}

.pc-custom-input::-webkit-outer-spin-button,
.pc-custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pc-custom-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.12);
}

.pc-custom-input::placeholder {
    color: #aaaaaa;
    font-size: 13px;
}

.pc-custom-unit {
    font-size: 15px;
    font-weight: 600;
    color: #666666;
    flex-shrink: 0;
    min-width: 20px;
}

/* -------------------------------------------
   Payment Method Grid
   ------------------------------------------- */
.pc-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.pc-payment-option {
    display: block;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.pc-payment-radio {
    display: none;
}

.pc-payment-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    color: #555555;
    transition: all 0.2s ease;
    text-align: center;
    padding: 0 6px;
    white-space: nowrap;
}

.pc-payment-label:hover {
    border-color: #2196F3;
    color: #2196F3;
}

.pc-payment-radio:checked + .pc-payment-label {
    background-color: #2196F3;
    border-color: #2196F3;
    color: #ffffff;
    font-weight: 600;
}

/* -------------------------------------------
   Summary Section
   ------------------------------------------- */
.pc-summary {
    border-top: 1px solid #e0e0e0;
    padding-top: 18px;
    margin-top: 0;
}

.pc-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: #666666;
}

.pc-summary-row span:last-child {
    font-weight: 600;
    color: #333333;
}

.pc-summary-total {
    border-top: 1px solid #eeeeee;
    margin-top: 8px;
    padding-top: 12px;
}

.pc-summary-total span:first-child {
    font-weight: 600;
    color: #333333;
    font-size: 15px;
}

.pc-summary-total span:last-child {
    font-weight: 700;
    color: #2196F3;
    font-size: 18px;
}

/* -------------------------------------------
   Modal Footer
   ------------------------------------------- */
.pc-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px 24px;
}

.pc-btn {
    flex: 1;
    height: 48px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    padding: 0;
}

.pc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pc-btn-cancel {
    background-color: #ffffff;
    border: 1px solid #dddddd;
    color: #666666;
}

.pc-btn-cancel:hover {
    background-color: #f5f5f5;
    border-color: #cccccc;
}

.pc-btn-charge {
    background-color: #2196F3;
    color: #ffffff;
}

.pc-btn-charge:hover {
    background-color: #1976D2;
}

.pc-btn-charge:disabled {
    background-color: #90CAF9;
}

/* -------------------------------------------
   PayApp Dimm Overlay
   ------------------------------------------- */
.pc-dimm {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 99999;
}

/* -------------------------------------------
   Point Charge Trigger Button (Header)
   ------------------------------------------- */
.pc-charge-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 13px;
    background-color: #2196F3;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease;
    vertical-align: middle;
    margin-left: 6px;
    text-decoration: none;
    letter-spacing: 0;
}

.pc-charge-link:hover {
    background-color: #1976D2;
    color: #ffffff;
    text-decoration: none;
}

/* -------------------------------------------
   Point Value (Header)
   ------------------------------------------- */
.pc-point-value {
    position: relative;
    top: 2px;
}

/* -------------------------------------------
   Charge Full Width Button (charge_point.php)
   ------------------------------------------- */
.pc-charge-fullwidth {
    width: 100%;
    display: block;
}

/* ============================================
   Responsive - Tablet Portrait (768px~1023px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1023px) {
    .pc-modal-overlay.active {
        padding: 32px 16px;
    }
}

/* ============================================
   Responsive - Mobile (360px~767px)
   ============================================ */
@media (max-width: 767px) {
    .pc-modal-overlay.active {
        padding: 20px 12px;
        align-items: flex-start;
    }

    .pc-modal {
        max-width: 100%;
        border-radius: 10px;
    }

    .pc-modal-header {
        padding: 16px 18px;
    }

    .pc-modal-title {
        font-size: 16px;
    }

    .pc-modal-body {
        padding: 18px;
    }

    .pc-balance-section {
        padding: 14px 16px;
        margin-bottom: 20px;
    }

    .pc-balance-value {
        font-size: 20px;
    }

    .pc-amount-grid {
        gap: 8px;
    }

    .pc-amount-btn {
        height: 44px;
        font-size: 14px;
    }

    .pc-bonus-badge {
        font-size: 10px;
        padding: 1px 5px;
    }

    .pc-terms-section {
        padding: 12px 14px;
    }

    .pc-terms-list li {
        font-size: 10px;
    }

    .pc-bonus-tier-info {
        font-size: 11px;
        gap: 3px 6px;
    }

    .pc-payment-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .pc-payment-label {
        height: 42px;
        font-size: 13px;
    }

    .pc-modal-footer {
        padding: 14px 18px 20px;
    }

    .pc-btn {
        height: 46px;
        font-size: 14px;
    }
}

/* ============================================
   Responsive - Small Mobile (~480px)
   ============================================ */
@media (max-width: 480px) {
    .pc-modal-overlay.active {
        padding: 16px 10px;
    }

    .pc-modal-header {
        padding: 14px 16px;
    }

    .pc-modal-body {
        padding: 16px;
    }

    .pc-balance-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px 16px;
    }

    .pc-balance-value {
        font-size: 22px;
        align-self: flex-end;
    }

    .pc-amount-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pc-amount-btn {
        height: 48px;
        font-size: 15px;
    }

    .pc-custom-input {
        height: 48px;
        font-size: 16px;
    }

    .pc-payment-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .pc-payment-label {
        height: 46px;
        font-size: 13px;
    }

    .pc-summary-total span:last-child {
        font-size: 17px;
    }

    .pc-modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
        padding: 14px 16px 18px;
    }

    .pc-btn {
        height: 48px;
    }

    .pc-charge-link {
        height: 24px;
        padding: 0 8px;
        font-size: 10px;
    }
}

/* ============================================
   Responsive - Fold/Flip (~359px)
   ============================================ */
@media (max-width: 359px) {
    .pc-modal-overlay.active {
        padding: 10px 6px;
    }

    .pc-modal {
        border-radius: 8px;
    }

    .pc-modal-header {
        padding: 12px 14px;
    }

    .pc-modal-title {
        font-size: 15px;
    }

    .pc-modal-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .pc-modal-body {
        padding: 14px;
    }

    .pc-balance-section {
        padding: 12px 14px;
    }

    .pc-balance-value {
        font-size: 20px;
    }

    .pc-payment-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .pc-payment-label {
        height: 42px;
        font-size: 12px;
        padding: 0 4px;
    }

    .pc-modal-footer {
        padding: 12px 14px 16px;
    }
}
