/**
 * FreePay iframe payment modal styles.
 *
 * Fullscreen overlay with centered iframe container.
 * Responsive: adapts to mobile viewports.
 */

.freepay-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: freepay-fade-in 0.25s ease-out;
}

@keyframes freepay-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.freepay-modal-container {
    position: relative;
    width: 90%;
    max-width: 520px;
    height: 85%;
    max-height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: freepay-slide-up 0.3s ease-out;
}

@keyframes freepay-slide-up {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.freepay-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.freepay-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.freepay-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.freepay-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.freepay-modal-body {
    flex: 1;
    position: relative;
    background: #fafafa;
}

.freepay-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading spinner shown while iframe loads */
.freepay-modal-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #635bff;
    border-radius: 50%;
    animation: freepay-spin 0.8s linear infinite;
}

@keyframes freepay-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Close confirmation dialog */
.freepay-modal-confirm {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.freepay-modal-confirm-box {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.freepay-modal-confirm-box p {
    margin: 0 0 18px;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.freepay-modal-confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.freepay-modal-confirm-buttons button {
    padding: 8px 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.freepay-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.freepay-btn-cancel:hover {
    background: #e0e0e0;
}

.freepay-btn-confirm {
    background: #635bff;
    color: #fff;
    border-color: #635bff;
}

.freepay-btn-confirm:hover {
    background: #4f46e5;
}

/* Mobile */
@media (max-width: 600px) {
    .freepay-modal-container {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
}
