/* style.css */

/* --- General and Reset Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Main Wrapper - General for all pages */
.main-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    background-color: #f0f2f5;
    position: relative;
    overflow: hidden;
}

/* Specific wrappers for pages without waves or two-column layout */
.main-wrapper.simple-page,
.main-wrapper.admin-dashboard-page {
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    overflow: auto;
}

/* Wave Background Elements (Hanya untuk halaman login/daftar) */
.wave-top-left, .wave-bottom-right {
    position: absolute;
    z-index: 1;
    transition: all 0.5s ease-in-out;
}

.wave-top-left {
    top: 0;
    left: 0;
    width: 50vw;
    height: 25vh;
    background-color: #e42121;
    border-bottom-right-radius: 40% 100%;
}

.wave-bottom-right {
    bottom: 0;
    right: 0;
    width: 38vw;
    height: 35vh;
    background-color: #e42121;
    border-top-left-radius: 40% 100%;
}

/* ==========================================================================
   Content Wrapper & Auth Sections
   ========================================================================== */
.content-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 40px 0;
    z-index: 2;
    position: relative;
    align-items: center;
    flex-grow: 1;
}

/* Gaya Awal untuk Left Section (Desktop & Layar Besar) */
.left-section {
    flex: 1;
    padding-right: 4rem;
    padding-left: 2rem;
    color: #333;
    text-align: left;
}

.left-section h1 {
    font-size: 3.2rem;
    color: #e42121;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.left-section p {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.left-section strong {
    font-weight: 700;
}

.left-section .arrow {
    font-size: 3rem;
    color: #e42121;
    margin-top: 3rem;
}

/* Gaya Umum untuk Form Pendaftaran & Login */
.right-section {
    flex-basis: 450px;
    width: 100%;
    max-width: 450px;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 3;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.right-section h2, .admin-content-card h1, .admin-content-card h2, .auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #e42121;
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
}

.right-section h2::after, .auth-card h1::after, .admin-content-card h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #e42121;
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555555;
    font-size: 0.95em;
}

input[type="email"], input[type="password"], input[type="text"], input[type="tel"] {
    width: 100%;
    height: 50px;
    padding: 0 1rem;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

input[type="email"]:focus, input[type="password"]:focus, input[type="text"]:focus, input[type="tel"]:focus {
    border-color: #e42121;
    outline: none;
    box-shadow: 0 0 0 3px rgba(228, 33, 33, 0.2);
}

.terms-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.terms-container input[type="checkbox"]:disabled {
    cursor: not-allowed;
    background-color: #f0f0f0;
    border-color: #cccccc;
}

.terms-container input[type="checkbox"]:disabled + .terms-label {
    color: #aaaaaa;
    cursor: not-allowed;
}

.terms-container input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #999999;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.terms-container input[type="checkbox"]:checked {
    background-color: #e42121;
    border-color: #e42121;
}

.terms-container input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-container label.terms-label {
    display: inline;
    font-weight: 400;
    font-size: 0.9em;
    color: #666666;
    line-height: 1.5;
}

.terms-container a {
    color: #e42121;
    text-decoration: none;
    font-weight: 600;
}

.terms-container a:hover {
    text-decoration: underline;
}

.reset-password {
    display: block;
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e42121;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.reset-password:hover {
    color: #d11a1a;
    text-decoration: underline;
}

.btn-daftar {
    width: 100%;
    padding: 1rem;
    background-color: #e42121;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-bottom: 1.5rem;
}

.btn-daftar:hover:not(:disabled) {
    background-color: #d11a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-daftar:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #aaaaaa;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dddddd;
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background-color: white;
    color: #555555;
    border: 1px solid #dddddd;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background-color: #f7f7f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-google .fab {
    margin-right: 10px;
    font-size: 1.2em;
    color: #e42121;
}

.login-link, .daftar-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95em;
    color: #666666;
}

.login-link a, .daftar-link a {
    color: #e42121;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover, .daftar-link a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    padding: 20px;
    color: #888;
    background-color: #f0f2f5;
    font-size: 0.9em;
    position: static;
    bottom: 0;
    left: 0;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* Gaya untuk tampilan mobile (lebar layar <= 768px) */
@media (max-width: 768px) {
    .wave-top-left {
        height: 15vh; /* Mengurangi ketebalan wave atas */
    }
    
    .wave-bottom-right {
        height: 10vh; /* Mengurangi ketebalan wave bawah */
    }

    .content-wrapper {
        flex-direction: column;
        padding: 20px 15px;
        align-items: center;
        text-align: center;
        z-index: 2;
        padding-top: 15vh; /* Menyesuaikan padding-top dengan tinggi wave atas baru */
        padding-bottom: 15vh; /* Menyesuaikan padding-bottom untuk memberi ruang footer */
    }

    .left-section {
        padding: 0;
        text-align: center;
        margin-bottom: 2rem;
        margin-top: 1rem;
    }

    .left-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .left-section p {
        font-size: 1rem;
    }

    .left-section .arrow {
        display: none;
    }
    
    .right-section {
        flex-basis: auto;
        width: 100%;
        max-width: 400px;
        padding: 1.5rem;
        margin-top: 2rem;
        text-align: left;
    }

    /* Perbaikan untuk footer di mobile */
    footer {
        position: relative;
        margin-top: 2rem;
    }
}

/* Gaya untuk tampilan desktop (lebar layar > 768px) */
@media (min-width: 768px) {
    .content-wrapper {
        flex-direction: row;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .left-section {
        flex: 1;
        padding-right: 4rem;
        padding-left: 2rem;
        text-align: left;
    }

    .left-section h1 {
        font-size: 3.2rem;
        margin-bottom: 1.5rem;
    }

    .left-section p {
        font-size: 1.1rem;
    }

    .left-section .arrow {
        display: block;
        font-size: 3rem;
        color: #e42121;
        margin-top: 3rem;
    }

    .right-section {
        flex-basis: 450px;
        margin-top: 0;
    }
}
/* ==========================================================================
   Error Highlight + Toast Notification
   ========================================================================== */

.error-message {
    color: #e42121;
    font-size: 0.85em;
    margin-top: 5px;
    display: none;
}

input.error {
    border-color: #e42121 !important;
    box-shadow: 0 0 0 3px rgba(228, 33, 33, 0.2);
}

/* Toast container */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Toast box */
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    max-width: 320px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease, fadeOut 0.5s ease 3s forwards;
}

.toast.success {
    background: linear-gradient(45deg, #4CAF50, #43A047);
}

.toast.error {
    background: linear-gradient(45deg, #E53935, #D32F2F);
}

/* Animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(100%); }
}

.btn-delete-review {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 1rem;
    margin-left: auto;
}
.btn-delete-review:hover {
    color: #e42121;
}
.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* password preview (daftar) */
.password-wrapper {
  position: relative;
  display: block;
  margin-bottom: 1.5rem;
}

.password-wrapper input {
  line-height: normal;
  width: 100%;
  padding-right: 44px;
  box-sizing: border-box;
}

.toggle-password-register {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-2%);
  cursor: pointer;
  color: #999;
  font-size: 1.1em;
  line-height: 1;
  border: none;
  background: transparent;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.toggle-password-register:focus {
    outline: 2px solid #e42121;
    outline-offset: 2px;
}

.toggle-password-register:hover {
  color: #e42121;
}

.toggle-password-register i {
  pointer-events: none;
}