/**
 * TSL Booking Portal - Hotel & Lodge Forms Styles
 * Uses CSS variables from portal.css for consistency
 */

/* MODAL STYLES - Uses variables from portal.css */
.tsl-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tsl-modal-container.active {
    display: flex;
}

.tsl-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: -1;
    backdrop-filter: blur(4px);
}

.tsl-modal-content {
    background: var(--card-bg, #ffffff);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-xl, 0 30px 60px rgba(0, 0, 0, 0.18));
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    z-index: 10000;
    position: relative;
}

.tsl-modal--large {
    max-width: 1000px;
}

.tsl-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg, 24px);
    border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.1));
    background: var(--muted, #ececf0);
}

.tsl-modal-header h2,
.tsl-modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold, 600);
    color: var(--foreground, #0a0a0a);
}

.tsl-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--muted-fg, #717182);
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md, 10px);
    transition: all 0.2s ease;
}

.tsl-modal-close:hover {
    background: var(--muted, #ececf0);
    color: var(--foreground, #0a0a0a);
}

/* HOTEL FORM STYLES */
.tsl-hotel-form {
    padding: 20px;
}

.tsl-hotel-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tsl-hotel-section:last-of-type {
    border-bottom: none;
}

.tsl-hotel-section-label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: #333;
}

.tsl-hotel-subsection-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #222;
}

/* GUEST SELECTOR GRID */
.tsl-guest-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.tsl-guest-checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tsl-guest-checkbox-label:hover {
    background: #f5f5f5;
    border-color: #999;
}

.tsl-guest-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.tsl-checkbox-text {
    font-size: 14px;
    color: #333;
}

/* FORM GROUPS */
.tsl-form-group {
    margin-bottom: 15px;
}

.tsl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.tsl-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

/* Form inputs inherit from portal.css, but can be overridden here if needed */
.tsl-form-input,
.tsl-form-textarea,
.tsl-hotel-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg, #f3f3f5);
    border: 1px solid var(--input-border, rgba(0, 0, 0, 0.1));
    border-radius: var(--radius-md, 10px);
    font-size: var(--font-base, 16px);
    font-family: var(--font-family, 'Poppins', sans-serif);
    color: var(--foreground, #0a0a0a);
    transition: all 0.2s ease;
}

.tsl-form-input:focus,
.tsl-form-textarea:focus,
.tsl-hotel-select:focus {
    outline: none;
    border-color: var(--input-focus, #030213);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--input-focus-ring, rgba(3, 2, 19, 0.1));
}

.tsl-form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* HOTEL SELECT WITH INFO BUBBLE */
.tsl-hotel-select-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tsl-hotel-select {
    flex: 1;
}

.tsl-hotel-info-btn {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.tsl-hotel-info-btn:hover {
    background: #005a87;
}

.tsl-info-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tsl-hotel-info-btn:hover .tsl-info-tooltip {
    opacity: 1;
}

/* ROOMING LIST */
.tsl-rooming-list {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.tsl-room-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.tsl-room-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tsl-room-type-select {
    width: 100%;
}

.tsl-room-type-select label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #666;
}

.tsl-room-type-select select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.tsl-room-actions {
    display: flex;
    gap: 5px;
}

.tsl-btn-icon {
    background: #dc3545;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.tsl-btn-icon:hover {
    background: #c82333;
}

/* BUTTONS */
/* Buttons inherit from portal.css - these are form-specific overrides if needed */
.tsl-btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-md, 10px);
    font-size: var(--font-base, 16px);
    font-weight: var(--font-weight-medium, 500);
    font-family: var(--font-family, 'Poppins', sans-serif);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    letter-spacing: var(--letter-spacing-tight, 0.04em);
}

.tsl-btn-primary {
    background: var(--primary, #030213);
    color: var(--primary-foreground, #ffffff);
}

.tsl-btn-primary:hover:not(:disabled) {
    background: #050425;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
}

.tsl-btn-secondary {
    background: var(--secondary, #f3f4f6);
    color: var(--secondary-foreground, #030213);
    border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
}

.tsl-btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

.tsl-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* FORM ACTIONS */
.tsl-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* LODGE ROOMING STYLES */
.tsl-lodge-rooming-form {
    padding: 20px;
}

.tsl-rooming-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px;
    color: #856404;
    margin-bottom: 20px;
}

.tsl-rooming-category {
    margin-bottom: 25px;
}

.tsl-rooming-category-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
}

.tsl-rooming-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tsl-rooming-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.tsl-rooming-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tsl-rooming-item-title {
    font-weight: 600;
    color: #222;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tsl-rooming-item-specs {
    display: flex;
    gap: 15px;
    margin-left: 10px;
}

.tsl-item-spec {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 3px;
}

.tsl-rooming-item-guests {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tsl-guest-assignment {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tsl-guest-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    min-width: 70px;
    padding-top: 6px;
}

.tsl-guest-dropdown {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    min-width: 150px;
}

.tsl-guest-dropdown:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.tsl-additional-guests-container {
    margin-top: 10px;
}

.tsl-guest-assignment-additional {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

.tsl-guest-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tsl-guest-input-group .tsl-guest-dropdown {
    flex: 1;
}

.tsl-add-guest-btn {
    margin-top: 10px;
    width: 100%;
}

/* OVERVIEW SECTIONS */
.tsl-overview-sections {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.tsl-overview-block {
    background: white;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.tsl-overview-block:last-child {
    margin-bottom: 0;
}

.tsl-overview-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0073aa;
}

.tsl-overview-title i {
    font-size: 18px;
}

/* FLYING TOGETHER */
.tsl-flying-group {
    margin-bottom: 15px;
}

.tsl-flying-group:last-child {
    margin-bottom: 0;
}

.tsl-flying-group-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tsl-flying-item {
    background: #f9f9f9;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid #28a745;
}

.tsl-flying-item:last-child {
    margin-bottom: 0;
}

.tsl-flight-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 5px;
}

.tsl-flight-number {
    font-weight: 600;
    color: #222;
    font-size: 13px;
}

.tsl-flight-date {
    font-size: 12px;
    color: #666;
}

.tsl-flight-guests {
    font-size: 13px;
    color: #333;
}

/* STAYING TOGETHER */
.tsl-staying-group {
    margin-bottom: 15px;
}

.tsl-staying-group:last-child {
    margin-bottom: 0;
}

.tsl-staying-group-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tsl-staying-item {
    background: #f9f9f9;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid #fd7e14;
}

.tsl-staying-item:last-child {
    margin-bottom: 0;
}

.tsl-hotel-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 5px;
}

.tsl-hotel-name {
    font-weight: 600;
    color: #222;
    font-size: 13px;
}

.tsl-hotel-dates {
    font-size: 12px;
    color: #666;
}

.tsl-hotel-guests {
    font-size: 13px;
    color: #333;
}

/* REGISTRATION STATUS */
.tsl-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.tsl-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.tsl-status-label {
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

.tsl-status-value {
    font-size: 16px;
    font-weight: 600;
    color: #0073aa;
}

.tsl-no-data {
    color: #999;
    font-size: 13px;
    margin: 0;
}

/* ALERTS */
.tsl-alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tsl-alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.tsl-alert i {
    margin-top: 2px;
}

.tsl-alert p {
    margin: 0;
    font-size: 13px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .tsl-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .tsl-guest-selector-grid {
        grid-template-columns: 1fr;
    }

    .tsl-form-row {
        grid-template-columns: 1fr;
    }

    .tsl-room-row {
        grid-template-columns: 1fr;
    }

    .tsl-status-grid {
        grid-template-columns: 1fr;
    }
}
