/* General Reset */
* {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #FFFFFF;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.form-wrapper {
    max-width: 900px;
    width: 100%;
}

h1 {
    font-size: 40px;
    font-weight: 600; /* Semi Bold */
    display: block;
    margin-bottom: 32px;
    color: #1A3351;
}

#register_success_message {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Typography & Inputs */
label {
    font-size: 16px;
    font-weight: 600; /* Semi Bold */
    display: block;
    margin-bottom: 8px;
    color: #1A3351;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    font-size: 16px;
    padding: 12px 16px;
    border: 1px solid #B2B2B2;
    border-radius: 13px;
    outline: none;
    transition: all 0.2s ease;
    color: black;
}

/* Placeholder styling */
input::placeholder {
    color: #B2B2B2;
}

/* Focus / Typing State */
input:focus {
    border: 2px solid #649BDD;
    box-shadow: 0 0 7.9px #6EA3E4;
}

input:focus::placeholder {
    color: transparent;
}

input:hover {
    box-shadow: 0 0 7.9px rgb(161, 195, 236);
}

/* Sections Spacing */
.text-input {
    margin-bottom: 20px;
}

.section-group {
    margin-bottom: 40px;
}

/* Apartments Container */
#apartments-master-container {
    border: 1px solid #B2B2B2;
    border-radius: 13px;
    padding: 20px;
    margin-bottom: 40px;
}

.input-row {
    display: flex;
    gap: 20px;
}

.input-row .text-input {
    flex: 1;
}

.error-box {
    display: none; /* Hidden by default */
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #c62828;
    border-radius: 4px;
    font-size: 14px;
}

/* Buttons */
button, 
.main-submit {
    cursor: pointer;
    background-color: #1A3351;
    color: #FFFFFF;
    border: none;
    border-radius: 13px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

button:hover,
.main-submit:hover {
    background-color: #4074AD;
    box-shadow: 0 0 7.9px #4074AD;
}

/* Packages Section */
#package-div {
    border: 1px solid #B2B2B2;
    border-radius: 13px;
    padding: 20px;
    margin-top: 30px;
}

.section-label {
    margin-bottom: 20px;
}

.package-grid {
    display: flex;
    gap: 15px;
}

.package-radio-input {
    flex: 1;
    border: 1px solid #B2B2B2;
    border-radius: 13px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer; /* Makes it clear the whole div is clickable */
    transition: all 0.2s ease;
}

.package-radio-input:hover {
    box-shadow: 0 0 7.9px #6EA3E4;
}

.package-radio-input:has(input[type="radio"]:checked) {
    border: 2px solid #649BDD;
    box-shadow: 0 0 7.9px #6EA3E4;
    background-color: #f0f7ff;
}

.package-radio-input input[type="radio"] {
    cursor: pointer;
    margin-bottom: 10px;
}

.package-radio-input label {
    cursor: pointer;
    margin-bottom: 5px;
}

.package-radio-input p {
    font-size: 13px;
    color: #666;
    margin: 10px 0 0 0;
    line-height: 1.4;
}

/* Checkbox Style */
.checkbox-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.checkbox-input label {
    margin-bottom: 0;
    font-weight: 400;
}

.form-button {
    margin-top: 40px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .package-grid {
        flex-direction: column;
    }
    .input-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Add this to your style.css to separate multiple apartments */
.apartment-entry {
    position: relative;
    padding-right: 40px; /* Make space for the X button */
}

.remove-apartment {
    width: 30px;
    height: 30px;
    padding: 0;
    background-color: #ff4d4d; /* Red color for removal */
    border-radius: 50%;
    font-size: 14px;
    position: absolute;
    right: 0;
    top: 35px; /* Aligns roughly with the input boxes */
    display: flex;
    justify-content: center;
    align-items: center;
}

.remove-apartment:hover {
    background-color: #cc0000;
    box-shadow: 0 0 7.9px #ff4d4d;
}

#cards-master-container {
    padding-bottom: 40px; 
}

/* Card Box Styling */
.card-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8fafd;
    border: 2px dashed #B2B2B2;
    border-radius: 13px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    transition: border-color 0.3s;
}

.card-box:hover {
    border-color: #649BDD;
}

.card-icon {
    font-size: 24px;
    background: #FFFFFF;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card-box .text-input {
    flex: 1;
    margin-bottom: 0; /* Override default margin */
}

/* Adjust Remove Button for Card Box */
.card-box .remove-apartment {
    position: static; /* Remove absolute positioning */
    width: 35px;
    height: 35px;
    flex-shrink: 0;
}

/* Hide the template from layout */
.template {
    display: none !important;
}

#existing-apartments-section {
    margin-bottom: 30px;
}

#apartments-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between each apartment box */
}

.apt-badge {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #f0f4f8; /* Light blue-grey tint */
    border: 1px solid #d1d9e0;
    border-radius: 10px;
    color: #1A3351;
    font-weight: 500;
}

.apt-badge::before {
    content: "🏠"; /* Apartment icon */
    margin-right: 12px;
    font-size: 18px;
}

.apt-label {
    font-size: 14px;
    color: #649BDD;
    margin-right: 8px;
    font-weight: 600;
}

/* Logic: Hide the remove button for the first apartment entry */
.apartment-entry:first-child .remove-apartment {
    display: none;
}

.tos-section {
    margin-top: 30px;
    margin-bottom: 20px;
}

#tos {
    width: 100%;
    height: 300px; /* Fixed height to force scrolling */
    padding: 15px;
    border: 1px solid #B2B2B2;
    border-radius: 13px;
    background-color: #F9F9F9;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    resize: none; /* Prevents user from manual resizing */
    outline: none;
    overflow-y: scroll; /* Ensures the scrollbar is functional */
}

/* Custom scrollbar to match the UI (Optional) */
#tos::-webkit-scrollbar {
    width: 8px;
}

#tos::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 13px;
}

#tos::-webkit-scrollbar-thumb {
    background: #B2B2B2;
    border-radius: 13px;
}

#tos::-webkit-scrollbar-thumb:hover {
    background: #1A3351;
}