/* Page background and centering */
body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #f4f7fb, #e9eef6);
    margin: 0;
    padding: 2rem 2rem;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

/* Card container */
.form-container {
    background: transparent;
    padding: 2rem 0;
    border-radius: 0;
    max-width: 750px;
    width: 100%;
    box-shadow: none;
}

/* Title */
.form-container h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
}

/* Labels */
label {
    display: block;
    margin-top: 1rem;
    margin-bottom: .35rem;
    font-weight: 600;
}

/* Inputs, selects, textarea */
input,
select,
textarea {
    width: 100%;
    padding: .65rem .75rem;
    border-radius: 10px;
    border: 1px solid #d4d8e0;
    font-size: .95rem;
    box-sizing: border-box;
    background: #fafbff;
}

/* Focus state */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4f7cff;
    box-shadow: 0 0 0 2px rgba(79, 124, 255, .15);
}

/* Submit button */
button[type="submit"] {
    margin-top: 1.5rem;
    width: 100%;
    padding: .75rem;
    border: none;
    border-radius: 12px;
    background: #4f7cff;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
}

/* Hover / active */
button[type="submit"]:hover {
    background: #3e66e6;
    box-shadow: 0 10px 25px rgba(79, 124, 255, .25);
}

button[type="submit"]:active {
    transform: translateY(1px);
}

/* Status text */
#status {
    margin-top: 1rem;
    text-align: center;
    font-size: .95rem;
}

/* Disabled options styling */
option[disabled] {
    color: #999;
}

.form-group h3 {
    margin: 0.5rem 0 0.5rem;
    font-size: 1.1rem;
}

.form-group {
    background: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.form-group hr {
    margin: 2rem 0 0.5rem;
    border: none;
    border-top: 1px solid #e0e4ef;
}

/* Remove hr from first form-group since it will have its own box */
.form-group:first-of-type hr {
    display: none;
}

/* Room info label styling */
.room-info-label {
    margin: 1rem 0 1.5rem 0;
    padding: 1rem;
    background: #f0f4ff;
    border-left: 4px solid #4f7cff;
    border-radius: 8px;
}

.room-info-label label {
    margin: 0;
    color: #2c3e50;
}

/* Cost Summary Styling */
.cost-summary {
    background: #f9fafc;
    border: 1px solid #e0e4ef;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.cost-row.cost-total {
    border-top: 2px solid #d4d8e0;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    font-size: 1rem;
}

/* Info Box Styling */
.info-box {
    background: #f9fafc;
    border: 1px solid #e0e4ef;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    line-height: 1.6;
    color: #2c3e50;
}

.info-box p {
    margin: 0;
}

/* Consistent markdown rendering inside info-boxes and diet labels */
.info-box.markdown>*:first-child,
.markdown>*:first-child {
    margin-top: 0;
}

.info-box.markdown>*:last-child,
.markdown>*:last-child {
    margin-bottom: 0;
}

.info-box.markdown p,
.markdown p {
    margin: 0 0 0.75em 0;
    line-height: 1.6;
}

.info-box.markdown ul,
.info-box.markdown ol,
.markdown ul,
.markdown ol {
    margin: 0 0 0.75em 1.25em;
    padding: 0;
    line-height: 1.6;
}

.info-box.markdown li,
.markdown li {
    margin-bottom: 0.25em;
}

.info-box.markdown strong,
.markdown strong {
    font-weight: 700;
}

/* Checkbox Group Styling */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f0f4ff;
    border-radius: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    flex-shrink: 0;
    margin-top: 0.25rem;
    cursor: pointer;
}

.checkbox-label {
    display: block;
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
    cursor: pointer;
}

/* Form headings */
.form-group h4 {
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1rem;
    color: #2c3e50;
}

.form-group h4:first-child {
    margin-top: 0;
}

/* ===== Partner/Friend secondary styling (Change 3) ===== */
.partner-secondary-label {
    font-weight: 400 !important;
    font-size: 0.85rem !important;
    color: #565656 !important;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.partner-secondary-select,
.partner-secondary-input {
    font-size: 0.875rem !important;
    color: #565656 !important;
    background: #f5f6f9 !important;
    border-color: #e2e5ee !important;
}

.partner-secondary-select:focus,
.partner-secondary-input:focus {
    border-color: #9fb4ff !important;
    box-shadow: 0 0 0 2px rgba(79, 124, 255, .08) !important;
    color: #555 !important;
}

/* ===== Required field asterisks (Change 4) ===== */
.req-star {
    color: #e53e3e;
    font-weight: 700;
    margin-left: 1px;
    transition: color 0.25s ease;
}

.req-star--done {
    color: #b8bec9;
}


/* ===== Info tooltip icon ===== */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #4f7cff;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    font-style: normal;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 1;
}

.tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a202c;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    width: 240px;
    white-space: normal;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
}

.tooltip-icon::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a202c;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
}

.tooltip-icon:hover::after,
.tooltip-icon:hover::before {
    opacity: 1;
}

/* ===== Capacity notification ===== */
/* Ensure hidden attribute works even with display:flex */
.capacity-notification[hidden] {
    display: none !important;
}

.capacity-notification {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: #fff5f5;
    border: 1.5px solid #fc8181;
    border-radius: 10px;
    color: #c53030;
    font-size: 0.92rem;
    line-height: 1.5;
}

.capacity-notification .capacity-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}