/* css/modal.css */

/* Latar belakang gelap (overlay) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    display: none; /* Sembunyi secara default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Kontainer pop-up */
.modal-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* Tombol close (X) */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-color);
    transform: rotate(90deg);
}

/* Form di dalam modal */
.modal-form-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-family: 'Playfair Display', serif;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.modal-switch-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.modal-switch-link a {
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
}

/* Sembunyikan form register secara default */
#register-view {
    display: none;
}

.sk-agreement {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sk-agreement input[type="checkbox"] {
    width: auto;
}
.modal-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-logo img {
    max-width: 100px;
    height: auto;
}

/* REVISI: Style tombol di dalam form modal */
.modal-form .cta-button {
    margin-top: 1rem;
    width: 100%;
    padding: 0.9rem; /* Padding disesuaikan agar lebih proporsional */
    font-size: 1.05rem; /* Ukuran font sedikit lebih besar */
    letter-spacing: 0.5px;
    display: flex; /* Memungkinkan ikon dan teks sejajar */
    justify-content: center;
    align-items: center;
    gap: 0.5rem; /* Jarak antara ikon spinner dan teks */
}

/* Style saat tombol di-disable (proses loading) */
.modal-form .cta-button:disabled {
    background-color: var(--accent-color);
    opacity: 0.7;
    cursor: not-allowed;
}