/* ===== HOTEL FORM ===== */
.hotel-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: var(--text-base);
    transition: all var(--transition-normal);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    padding: 0;
    border: none;
    box-shadow: none;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: var(--text-base);
    border-bottom: 1px solid var(--gray-100);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--gray-50);
}

/* ===== HOTELS LIST ===== */
.hotels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hotel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: all var(--transition-normal);
}

.hotel-item:hover {
    background: var(--gray-100);
}

.hotel-item-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
}

.hotel-item-info {
    flex: 1;
    min-width: 0;
}

.hotel-item-name {
    font-weight: 600;
    font-size: var(--text-base);
    margin-bottom: 2px;
}

.hotel-item-address {
    font-size: var(--text-xs);
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hotel-item-meta {
    margin-top: 4px;
    font-size: var(--text-2xs);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 5px;
}

.hotel-item-actions {
    display: flex;
    gap: 4px;
}

/* ===== HOTEL EDIT (inline card) ===== */
.hotel-edit-card {
    width: 100%;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hotel-edit-group {
    margin-bottom: 0;
}

.hotel-edit-label {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 5px;
    font-weight: 600;
}

.hotel-edit-input {
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 13px;
    padding: 7px 9px;
}

.hotel-edit-input-address {
    font-size: 12px;
}

.hotel-edit-suggestions {
    position: relative;
}

.hotel-residents-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.hotel-residents-tools {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.hotel-residents-count {
    font-size: var(--text-2xs);
    color: var(--gray-600);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 2px 7px;
}

.hotel-residents-search-wrap {
    position: relative;
    margin-bottom: 6px;
}

.hotel-residents-search-wrap i {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: var(--text-sm);
}

.hotel-residents-search {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 12px;
    padding: 6px 8px 6px 28px;
    background: var(--bg-surface);
}

.hotel-residents-list {
    max-height: 140px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: var(--gray-50);
    padding: 6px 8px;
}

.hotel-residents-group {
    margin-bottom: 6px;
}

.hotel-residents-group:last-child {
    margin-bottom: 0;
}

.hotel-residents-group-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-500);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 2px 0 4px;
}

.hotel-resident-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
}

.hotel-resident-row input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
}

.hotel-resident-name {
    font-size: 12px;
    color: var(--gray-700);
    line-height: 1.2;
    word-break: break-word;
}

.hotel-residents-empty {
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
    padding: 10px 6px;
}

.hotel-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 2px;
}


/* ===== HOTEL ICON STYLES ===== */
.hotel-icon {
    overflow: visible !important;
    background: none !important;
    border: none !important;
}

.hotel-icon-only {
    background: #1e293b;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-md);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.hotel-icon-only.multi {
    background: #4f46e5;
    font-size: var(--text-sm);
}

.hotel-icon-label {
    background: #1e293b;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    width: max-content;
    border: 1px solid rgba(255,255,255,0.2);
}

.hotel-icon-label.multi {
    background: #4f46e5;
    border: 2px solid white;
}


/* Przycisk hotelu przy techniku */
.tech-hotel-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-200);
    border: none;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    font-size: var(--text-2xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: all var(--transition-normal);
    opacity: 0.7;
    flex-shrink: 0;
    white-space: nowrap;
}

.tech-hotel-btn:hover {
    background: var(--primary);
    color: white;
    opacity: 1;
}

.tech-hotel-btn.has-hotel {
    background: var(--success);
    color: white;
    opacity: 1;
}

.tech-hotel-btn i {
    font-size: var(--text-3xs);
}

.tech-hotel-btn .hotel-name {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Popup przypisania hotelu */
.hotel-assign-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    z-index: 2000;
    min-width: 350px;
    max-width: 450px;
}

.hotel-assign-popup h3 {
    margin-bottom: 16px;
    font-size: var(--text-lg);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hotel-assign-popup .form-group {
    margin-bottom: 12px;
}

.hotel-assign-popup input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: var(--text-md);
}

.hotel-assign-popup input:focus {
    outline: none;
    border-color: var(--primary);
}

.hotel-assign-popup .saved-hotels-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.hotel-assign-popup .saved-hotel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.hotel-assign-popup .saved-hotel-item:hover {
    background: var(--gray-50);
}

.hotel-assign-popup .saved-hotel-item i {
    color: var(--primary);
}

.hotel-assign-popup .popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.hotel-assign-popup .popup-actions .btn {
    flex: 1;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1999;
    display: none;
}

/* Wskaźnik hotelu przy techniku w liście */
.tech-hotel-indicator {
    font-size: var(--text-2xs);
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tech-hotel-indicator i {
    font-size: var(--text-2xs);
    flex-shrink: 0;
}

/* Popup hotel assign - dodatkowe style */
.hotel-assign-popup .form-group {
    position: relative;
}

.hotel-assign-popup .autocomplete-dropdown {
    z-index: 2001;
}

/* Current hotel info w popupie */
.current-hotel-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.current-hotel-info .btn {
    margin-left: 10px;
}


/* ===== HOTEL IMPORT/EXPORT ===== */
.hotel-import-export {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hotel-import-export .btn {
    font-size: var(--text-base);
    padding: 8px 12px;
}
