/* Form field container - 4px gap for label/input spacing */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Use .body-text-regular class for typography */
.form-field > label {
    color: var(--gray-500);
}

/* Input wrapper for icon + field combinations - 12px padding, 8px gap between icon and input */
.input-wrapper {
    position: relative;
    width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--gray-25);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: white;
}

.input-field:disabled {
    background-color: var(--gray-50);
    cursor: default;
}

.input-wrapper:has(.input-field:not(:disabled)):hover {
    border-color: var(--green-300);
}

.input-wrapper:focus-within {
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px var(--green-20);
}

/* Text prefix in input wrapper */
.input-wrapper .input-prefix-text {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin-right: 0;
}

/* Text suffix in input wrapper */
.input-wrapper .input-suffix-text {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin-left: 0;
}

/* Icon size: 18x18px for consistent visual weight */
.input-wrapper .input-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.input-wrapper .input-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.input-wrapper .input-field {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
    outline: none;
}

.input-wrapper .input-field:hover,
.input-wrapper .input-field:focus {
    border: none;
    background: transparent;
    box-shadow: none;
}

.input-field {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    padding: 12px;
    background: var(--gray-25);
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Lufga';
    font-size: 1rem;
}

.input-field::selection {
    background: var(--green-100);
    color: var(--green-900);
}

.input-field:hover:not(:disabled) {
    border-color: var(--green-300);
}

.input-field:focus {
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px var(--green-20);
}
/* 
.input-field:disabled {
    background: var(--gray-50);
    cursor: not-allowed;
} */

/* Custom checkbox container - 12px gap between checkbox and label */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Custom checkbox - 20x20px, 2px top margin for optical alignment with text baseline */
.form-check-input {
    width: 20px;
    height: 20px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    background: var(--gray-25);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-check-input:hover:not(:disabled) {
    border-color: var(--green-300);
}

.form-check-input:checked {
    background: var(--green-400);
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px var(--green-20);
}

.form-check-input[type="checkbox"]:checked {
    background: var(--green-400) url("../images/icons/check_round-w-4jIrY.svg") no-repeat center center;
    background-size: 14px 10px;
}

.form-check-input[type="radio"]:checked:not(.custom-radio) {
    background: var(--green-400) url("../images/icons/check_round-w-4jIrY.svg") no-repeat center center;
    background-size: 14px 10px;
}

.form-check-input:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.form-check-input:disabled:checked {
    background: var(--green-200);
    border-color: var(--green-200);
    box-shadow: none;
}

.form-check-input[type="checkbox"]:disabled:checked {
    background: var(--green-200) url("../images/icons/check_round-w-4jIrY.svg") no-repeat center center;
    background-size: 14px 10px;
}

.form-check:has(.form-check-input:disabled) .form-check-label {
    color: var(--gray-400);
    cursor: not-allowed;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Custom select - 36px right padding for dropdown arrow positioned at 12px from right */
.form-select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    padding: 12px;
    background: var(--gray-25);
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23737373' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-select:hover:not(:disabled) {
    border-color: var(--green-300);
}

.form-select:focus {
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px var(--green-20);
}

.form-select:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Textarea - min-height 100px for comfortable multi-line input, use .body-text-regular class for typography */
textarea.form-control {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    padding: 12px;
    background: var(--gray-25);
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 100px;
    font-family: 'Lufga';
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5rem;
}

textarea.form-control::selection {
    background: var(--green-100);
    color: var(--green-900);
}

textarea.form-control:hover:not(:disabled) {
    border-color: var(--green-300);
}

textarea.form-control:focus {
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px var(--green-20);
}

textarea.form-control:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Logo upload layout - 30px gap, 135x135px circular preview image */
.organization-logo-input {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.organization-logo-input a {
    flex-shrink: 0;
}

.organization-logo-input a img {
    width: 135px;
    height: 135px;
    border-radius: 50%;
    object-fit: cover;
}

.organization-logo-input > div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo-vich-widget {
    display: flex;
    gap: 30px;
}

/* File upload button - 32px height, 32px horizontal padding, 16px margin for spacing from filename text. Use .body-text-regular class for typography */
input.logo-input::file-selector-button {
    height: 32px;
    border-radius: 8px;
    border: 1px solid #D6D6D6;
    padding: 4px 32px;
    background: var(--gray-200);
    text-align: center;
    color: var(--gray-800);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 16px;
}

/* Use .body-text-regular class for typography */
input.logo-input {
    border: none;
    background: none;
    outline: none;
    color: var(--gray-800);
}

/* Custom toggle switch */
.custom-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    min-width: 150px;
    height: 56px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    padding: 0px 20px 0px 16px;
    background: white;
    flex: 1;
}

.custom-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.custom-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-200);
    border-radius: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.custom-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.custom-toggle-input:checked + .custom-toggle-slider {
    background-color: var(--green-400);
}

.custom-toggle-input:checked + .custom-toggle-slider::before {
    transform: translateX(20px);
}

.custom-toggle-input:focus + .custom-toggle-slider {
    box-shadow: 0 0 0 3px var(--green-20);
}

.custom-toggle-input:disabled + .custom-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-toggle-text {
    color: var(--gray-800);
}

/* Fieldset for custom toggles - remove default styles */
fieldset:has(.custom-toggle-label) {
    border: none;
    padding: 0;
    margin: 0;
}

fieldset:has(.custom-toggle-label) legend {
    padding: 0;
    margin-bottom: 12px;
}

/* Container for custom toggles - flex layout with wrapping */
fieldset:has(.custom-toggle-label) > div {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

fieldset {
    border: none;
    margin: none;
    padding: none;
}

.hotel-checkbox {
    position: absolute;
    top: 4px;
    right: 4px;
}

.invalid-feedback {
    color: #DC2626;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Styles pour les champs en erreur */
.input-field.is-invalid,
.input-wrapper:has(.input-field.is-invalid) {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input-field.is-invalid:focus,
.input-wrapper:has(.input-field.is-invalid):focus-within {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.form-select.is-invalid {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-select.is-invalid:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.room-selection-footer,
.hotel-selection-footer {
    z-index: 100;
    position: fixed;
    bottom: 0px;
    right: 0px;
    left: 368px;
    border-left: solid 1px var(--gray-200);
    padding: 32px 80px 32px 48px;
    background-color: white;
}

.hotel-selection-header {
    margin-left: 368px;
    border-left: solid 1px var(--gray-200);
    padding: 16px 48px;
    background-color: white;
    position: sticky;
    top: 72px;
    z-index: 100;
}

/* Room Inventory Table Styles */
.room-inventory-section {
    margin: 24px 0;
}

.room-inventory-section .h4 {
    margin-bottom: 16px;
    color: var(--gray-700);
}

.room-inventory-table {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.room-table {
    width: 100%;
    border-collapse: collapse;
}

.room-table thead th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 600;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.room-table thead th:first-child {
    width: 50%;
}

.room-table thead th:nth-child(2) {
    width: 25%;
    text-align: center;
}

.room-table thead th:last-child {
    width: 25%;
    text-align: center;
}

.room-inventory-row {
    transition: background-color 0.2s ease;
}

.room-inventory-row:hover {
    background: var(--gray-25);
}

.room-inventory-row:not(:last-child) {
    border-bottom: 1px solid var(--gray-100);
}

.room-type-cell {
    padding: 16px;
    vertical-align: top;
}

.room-type-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.room-type-label {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.room-type-title {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.2;
}

.room-count-cell,
.room-price-cell {
    padding: 16px;
    text-align: center;
    vertical-align: top;
}

.room-count-input,
.room-price-input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--gray-25);
    text-align: center;
    transition: all 0.2s ease;
}

.room-count-input:focus,
.room-price-input:focus {
    outline: none;
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px var(--green-20);
    background: white;
}

.room-count-input:hover:not(:disabled),
.room-price-input:hover:not(:disabled) {
    border-color: var(--green-300);
}

.room-count-input::placeholder,
.room-price-input::placeholder {
    color: var(--gray-500);
}

.room-price-input {
    width: 120px;
}

/* Autocomplete dropdown styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    padding: 8px 0;
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu li {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--gray-800);
}

.dropdown-menu li:hover {
    background-color: var(--gray-50);
}

.dropdown-menu li:active {
    background-color: var(--gray-100);
}