/* --- Global Container Styling --- */
body {
    background-color: transparent;
    margin: 0;
    padding: 0;
}

.custom-form-container {
    background-color: transparent; /* Transparent container background */
    padding: 40px;
    border-radius: 8px; /* Subtle curvature for the container block */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Labels & Instruction Texts --- */
.custom-form-container label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #2c2c2c;
}

.custom-form-container .required-text {
    font-weight: normal;
    color: #707070;
    font-size: 13px;
    margin-left: 4px;
}

/* --- Inputs, Textareas, and Dropdowns --- */
.custom-form-container input[type="text"],
.custom-form-container input[type="email"],
.custom-form-container input[type="password"],
.custom-form-container input[type="number"],
.custom-form-container input[type="tel"],
.custom-form-container textarea,
.custom-form-container select {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 24px;
    background-color: #E6C463; /* Slightly darker shade inside inputs */
    border: 1px solid #1a1a1a; /* Thin solid dark border */
    border-radius: 20px; /* Highly rounded corners */
    font-size: 15px;
    color: #1a1a1a;
    box-sizing: border-box;
    outline: none;
    transition: background-color 0.2s ease;
}

/* Row wrapper for side-by-side fields (like First Name / Last Name) */
.form-row {
    display: flex;
    gap: 16px;
}
.form-row .form-group {
    flex: 1;
}

/* Large multiline text area adjustment */
.custom-form-container textarea {
    border-radius: 24px;
    min-height: 120px;
    resize: vertical;
}

/* Focus states to keep behavior clean */
.custom-form-container input:focus,
.custom-form-container textarea:focus,
.custom-form-container select:focus {
    background-color: #DFBD5C;
}

/* --- Custom Styled Select Dropdown --- */
.custom-form-container select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* Replicating the minimal clean downward chevron arrow icon */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://w3.org' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 18px;
    padding-right: 45px;
    cursor: pointer;
}

/* --- Checkbox Layout --- */
.custom-form-container .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.custom-form-container .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

.custom-form-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    background-color: #E6C463;
    cursor: pointer;
    position: relative;
}

.custom-form-container input[type="checkbox"]:checked {
    background-color: #22252a;
}

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

/* --- Primary Submit Button --- */
.custom-form-container button,
.custom-form-container .btn-submit {
    background-color: #22252a; /* Dark charcoal/black color */
    color: #ffffff;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 50px; /* Perfect pill-shaped rounding */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

.custom-form-container button:hover,
.custom-form-container .btn-submit:hover {
    background-color: #111215;
}

.custom-form-container button:active,
.custom-form-container .btn-submit:active {
    transform: scale(0.98);
}

/* --- Table Styling --- */
.custom-form-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.custom-form-container table th,
.custom-form-container table td {
    padding: 8px 12px;
    border: 1px solid #000000;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

/* First column: Pale Grey */
.custom-form-container table th:first-child,
.custom-form-container table td:first-child {
    background-color: #f2f2f2;
}

/* 2nd column (and subsequent even columns): Pale Blue */
.custom-form-container table th:nth-child(2n),
.custom-form-container table td:nth-child(2n) {
    background-color: #e8f4fd;
}

/* 3rd column (and subsequent odd columns starting at 3): White */
.custom-form-container table th:nth-child(2n+3),
.custom-form-container table td:nth-child(2n+3) {
    background-color: #ffffff;
}

/* Helper Classes */
.custom-form-container table th.header-bg,
.custom-form-container table td.header-bg,
.header-bg {
    background-color: #d9d9d9;
}

.custom-form-container table th.text-center,
.custom-form-container table td.text-center,
.text-center {
    text-align: center;
}

.custom-form-container table th.text-bold,
.custom-form-container table td.text-bold,
.text-bold {
    font-weight: bold;
}

.custom-form-container table tr.row-spacer,
.custom-form-container table tr.row-spacer td,
.row-spacer,
.row-spacer td {
    height: 25px;
    border: none !important;
    background-color: transparent !important;
    padding: 0;
}
