/* Base Layout - Modern with Gradient */
.signup-page {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0a1f3d 0%, #102a4d 50%, #1a3a5f 100%);
    min-height: 100vh;
    padding: 15px 20px 0px 20px;
}

/* Intake-specific page: softer gradient so the navbar card remains distinct */
.intake-page {
    display: flex;
    flex-direction: column;
    /* Smoother vertical gradient to avoid an abrupt color shift mid-page */
    background: linear-gradient(180deg,
                #dbeeff 0%,
                #e8f5ff 30%,
                #eaf6ff 60%,
                #d9eefb 100%);
    min-height: 100vh;
    padding: 15px 20px 0 20px;
}

/* Reduce top spacing on intake page so title isn't pushed too far down */
.intake-page .signup-container {
    padding-top: 1.25vh; /* was 3vh globally */
}
.intake-page .navbar {
    /* slightly more opaque so it reads above the light background */
    background: rgba(16, 42, 77, 0.96);
    box-shadow: 0 14px 40px rgba(2,10,20,0.18);
}

/* Center navbar on intake page without changing the global navbar-container padding */
@media (max-width: 1200px) {
    .intake-page .navbar {
        margin: 8px auto 0; /* center via auto margins */
        max-width: 760px; /* match the .form-section max-width */
        width: 100%;
        border-radius: 14px; /* keep subtle rounded corners */
    }
}

/* Card variant for intake page: left-aligned headings and more breathing room */
.signup-card.intake-card {
    /* Make the outer container visually transparent so inner .form-section
       elements act as the floating cards (clean, home-like look). */
    text-align: left;
    padding: 0; /* remove outer padding */
    max-width: 920px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.signup-card.intake-card h1 {
    margin: 0 0 6px 0;
    font-size: 28px;
    color: #07203a;
    text-align: center; /* center main title as requested */
}

.signup-card.intake-card h2 {
    font-size: 16px;
    color: #2b556f;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 18px;
}

/* Make each question stand out slightly as its own card */
.signup-card.intake-card .form-section {
    background: #ffffff;
    padding: 16px 18px;
    border-radius: 12px;
    margin: 18px auto; /* center each question card */
    border: 1px solid rgba(7,32,58,0.06);
    box-shadow: 0 18px 40px rgba(7,32,58,0.10), 0 6px 18px rgba(7,32,58,0.06);
    max-width: 760px; /* keep cards a comfortable width */
}

/* Remove box styling for form-sections in admin accounts (not intake cards) */
.signup-container > div:not(.signup-card) .form-section {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin: 18px 0;
    border: none;
    box-shadow: none;
}

/* Admin tabs styling */
.admin-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px auto 32px;
    max-width: 760px;
}

.admin-tab {
    flex: 1;
    text-align: center;
    padding: 14px 24px;
    background: #ffffff;
    color: #102a4d;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(7,32,58,0.1);
    box-shadow: 0 4px 12px rgba(7,32,58,0.08);
}

.admin-tab:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(7,32,58,0.12);
}

.admin-tab.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #0056b3;
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.3);
}

.admin-tab i {
    margin-right: 8px;
}

/* Form footer and button layout for intake page */
.signup-card.intake-card .form-footer {
    display: block;
    max-width: 760px;
    margin: 0 auto 24px auto;
    padding: 0 18px;
    box-sizing: border-box;
}

/* Ensure submit button fills the question card width on mobile */
.signup-card.intake-card .form-footer .signup-btn {
    width: 100%;
    display: block;
}

@media (max-width: 480px) {
    .intake-page .signup-container { padding-top: 0.8vh; }
    .signup-card.intake-card .form-section { padding: 12px 14px; margin: 12px auto; }
    .signup-card.intake-card .form-footer { padding: 0 12px; }
}

.signup-card.intake-card .form-section p {
    color: #234b5f;
}

.signup-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    padding-top: 3vh;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.signup-title {
    text-align: center;
    font-size: 50px;
    font-weight: 700;
    letter-spacing: 2px;
    width: 100%;
    color: #FFFFFF;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Banner */
.signup-banner {
    text-align: center;
    width: 100%;
    max-width: 900px;
    margin-bottom: 15px;
}

.signup-banner h1 {
    font-size: 24px;
    letter-spacing: 1.5px;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.signup-banner p {
    font-size: 15px;
    color: #B8C5D6;
    margin-top: 5px;
    font-weight: 300;
}

/* Feature Icons Grid - Same as Login */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 20px 0 auto;
    text-align: center;
}

.features {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding-top: 20px;
}

.features p {
    font-size: 18px;
    letter-spacing: 2px;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    color: #E5E7EB;
    margin-top: 15px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    transition: transform 0.3s ease-in-out;
    max-width: 150px;
}

.feature p {
    font-size: 16px;
    font-weight: 600;
    color: #E5E7EB;
}

.feature i {
    font-size: 2rem;
    color: #FFFFFF;
    margin-bottom: 5px;
}

.feature:hover {
    transform: scale(1.1);
}

/* Signup form card */
.signup-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    margin: 10px 20px 20px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e7f3ff;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    align-self: flex-start;
    border: 2px solid transparent;
}

.back-btn:hover {
    background: #007bff;
    color: white;
    border-color: #0056b3;
    transform: translateX(-3px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.back-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.back-btn:hover i {
    transform: translateX(-2px);
}

.signup-card h2 {
    display: flex;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.8rem;
    margin-top: 0;
}

.signup-card h2 i {
    position: static !important;
    display: inline-block;
}

/* Input Group (Each Input Field) */
.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 15px;
}

/* Label Styling */
.input-group label {
    font-weight: bold;
    color: black;
    margin-bottom: 5px;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Input Field Wrapper*/
.input-field {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field i {
    position: absolute;
    left: 10px;
    color: #555;
    font-size: 16px;
}

/* Input Styling with Focus */
.signup-input {
    width: 100%;
    padding: 10px 10px 10px 35px !important;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.signup-input:focus {
    outline: none;
    border-color: #007bff;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.signup-input:hover {
    border-color: #aaa;
}

/* Role selection: Tenant/Landlord */
.role-selection{
    text-align: left;
    margin-bottom: 20px;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-left: 10px;
    padding-right: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.role-selection:has(input:checked) {
    background: #e7f3ff;
    border-color: #007bff;
}

/* "I have agree Terms & Conditions text" */
.disclaimer {
    display: flex;
    align-items: center;
    text-align: left;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.role-selection p, .disclaimer p {
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
    color: black;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.role-option:hover {
    background: #f0f0f0;
}

.role-option:has(input:checked) {
    background: #cce5ff;
    font-weight: 600;
}

/* Signup button */
.signup-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 5px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
}

.signup-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Sign-up / Login text */
.signup-text {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

.signup-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.signup-link:hover {
    text-decoration: underline;
}

.signup-container .fa-user-plus {
    position: static !important;
    display: inline-block;
}

/* Hide the checkbox */
.toggle-checkbox {
    display: none;
}

/* Custom Checkbox Styling */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
}

/* Hide default checkbox */
.custom-checkbox input {
    display: none;
}

/* Custom checkbox design */
.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #007bff;
    border-radius: 5px;
    display: inline-block;
    position: relative;
}

/* Show check when checked */
.custom-checkbox input:checked + .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

/* Add checkmark icon */
.custom-checkbox input:checked + .checkmark::after {
    content: "✔";
    font-size: 12px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

/* Disclaimer Text */
.disclaimer-text {
    color: black;
    font-weight: normal;
}

/* Terms and Conditions Link */
.disclaimer-link {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 0;
}

.disclaimer-link:hover {
    color: #0056b3; 
}

/* Show modal when checkbox is checked */
.toggle-checkbox:checked + .modal-popup {
    opacity: 1;
    visibility: visible;
}

/* Modal Popup */
.modal-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 600px;
    max-height: 80vh;
    background: #fff;
    padding: 20px;
    border: 2px solid #102a4d;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: justify;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto; /* Enables scrolling */
}

.popup-content {
    border-radius: 10px;
}

.popup-content h4 {
    text-align: center;
    font-weight: bold;
    font-size: 24px;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Close Button */
.close-popup {
    position: sticky;
    top: 0;
    right: 0;
    padding: 10px;
    font-size: 24px;
    text-decoration: none;
    color: red;
    cursor: pointer;
    background: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    z-index: 1001; /* Ensures it's above the content */
}

/* Close Button Hover Effect */
.close-popup:hover {
    background: #f8d7da;
    color: darkred;
    cursor: pointer;
}

.close-popup:active {
    transform: scale(0.95);
}

/* Ensure the modal adapts to smaller screens */
@media (max-width: 600px) {
    .modal-popup {
        width: 90vw; 
        max-height: 90vh;
    }
}

.error-summary {
    background: #fff3f3;
    border-left: 4px solid #d32f2f;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #b71c1c;
  }

  .error-text {
    color: #d32f2f;
    margin-top: 4px;
    font-size: 0.875rem;
  }

/* Responsive Design */
@media (max-width: 768px) {
    .signup-title {
        font-size: 35px;
    }

    .signup-container {
        padding-top: 5vh;
    }

    .signup-banner h1 {
        font-size: 22px;
    }

    .signup-banner p {
        font-size: 14px;
    }

    .features {
        padding-top: 10px;
    }

    .features p {
        font-size: 14px;
    }

    /* Stack features grid */
    .features-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
        justify-items: center;
        align-items: center;
    }

    .feature i {
        font-size: 1.8rem;
    }

    .feature p {
        font-size: 14px;
    }

    .signup-card {
        max-width: 90%;
        padding: 15px;
        padding-left: 25px;
        padding-right: 25px;
    }
}

@media (max-width: 480px) {
    .signup-title {
        font-size: 30px;
    }

    .signup-banner {
        margin-bottom: 5px;
    }

    .signup-banner h1 {
        font-size: 18px;
    }

    .signup-banner p {
        font-size: 12px;
    }

    .signup-container {
        padding-top: 3vh;
    }

    .features {
        padding-top: 5px;
    }

    .feature i {
        font-size: 1.5rem;
    }

    .feature p {
        font-size: 12px;
    }

    .signup-card {
        padding: 15px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .signup-input {
        font-size: 14px;
    }

    .signup-btn {
        font-size: 16px;
        padding: 16px;
    }

    .back-btn {
        font-size: 0.85rem;
    }

    .disclaimer {
        margin-bottom: 15px;
    }

    .disclaimer-text {
        font-size: 0.85rem;
    }
    /* Make intake page main title smaller on small screens */
    .signup-card.intake-card h1 {
        font-size: 20px;
    }
}
