/**
 * LAS CASAS MARKETPLACE - HOTEL DASHBOARD CSS
 * Mobile first
 */

/* ============================================
   INVENTORY MODAL
   ============================================ */

.lc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.lc-modal-overlay.show {
    opacity: 1;
}

.lc-modal {
    background: #1a1f24;
    border: 1px solid #E2C48E;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.lc-modal-overlay.show .lc-modal {
    transform: scale(1);
}

.lc-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(226,196,142,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.lc-modal-header h3 {
    margin: 0;
    color: #E2C48E;
    font-size: 1.2rem;
}

.lc-modal-close {
    background: none;
    border: none;
    color: #C2C2C2;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    min-width: 44px;
    min-height: 44px;
}

.lc-modal-body {
    padding: 20px;
}

.lc-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(226,196,142,0.2);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* Выделенные даты */
.lc-calendar-day.selected {
    border: 2px solid #E2C48E;
    background: rgba(226,196,142,0.15);
    transform: scale(1.02);
}

.lc-calendar-day.selected .lc-day-number {
    color: #E2C48E;
    font-weight: bold;
}

/* Кнопки массового редактирования */
#lc-bulk-update-inventory,
#lc-bulk-update-prices {
    background: rgba(226,196,142,0.15);
    border: 1px solid rgba(226,196,142,0.3);
    color: #E2C48E;
    transition: all 0.2s;
    min-height: 44px;
    padding: 10px 20px;
}

#lc-bulk-update-inventory:hover,
#lc-bulk-update-prices:hover {
    background: #E2C48E;
    color: #0B1014;
}

/* Цена в календаре */
.lc-day-price {
    font-size: 11px;
    color: #E2C48E;
    margin-top: 4px;
    font-weight: 600;
}

.lc-calendar-day .lc-day-price {
    display: block;
}

.lc-price-modifier {
    font-size: 10px;
    color: #FFB3BA;
    margin-top: 2px;
}

/* ============================================
   ROOM TYPE GALLERY (фото типов номеров)
   ============================================ */

.lc-room-type-photo {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(226,196,142,0.2);
}

.lc-room-type-gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.lc-gallery-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E2C48E;
    background: #0B1014;
}

.lc-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lc-gallery-item .lc-remove-gallery-item {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lc-gallery-item .lc-remove-gallery-item:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.lc-room-type-upload-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lc-room-type-upload-btn .lc-btn {
    min-height: 40px;
}

.lc-help-text {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* ============================================
   PRICE MODAL
   ============================================ */

.lc-price-preview {
    margin-top: 12px;
    padding: 10px;
    background: #0B1014;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
}

.lc-price-preview span {
    color: #E2C48E;
    font-size: 20px;
    font-weight: bold;
}

/* ============================================
   ROOM TYPE STATS (для дашборда хоста)
   ============================================ */

.lc-room-types-stats {
    margin-top: 20px;
    padding: 16px;
    background: #0B1014;
    border-radius: 12px;
}

.lc-room-types-stats h4 {
    margin: 0 0 12px;
    color: #E2C48E;
    font-size: 16px;
}

.lc-room-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lc-room-stat-card {
    padding: 12px;
    background: #1a1f24;
    border-radius: 8px;
}

.lc-room-stat-name {
    font-weight: 600;
    color: #E2C48E;
    margin-bottom: 8px;
}

.lc-room-stat-details {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #C2C2C2;
    margin-bottom: 8px;
}

.lc-occupancy-bar {
    height: 6px;
    background: #2a2f34;
    border-radius: 3px;
    overflow: hidden;
}

.lc-occupancy-fill {
    height: 100%;
    background: #4CAF50;
    border-radius: 3px;
    transition: width 0.3s;
}

/* ============================================
   MOBILE ADAPTATIONS (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {
    .lc-modal {
        width: 95%;
        border-radius: 20px;
    }
    
    .lc-modal-header {
        padding: 14px 16px;
    }
    
    .lc-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .lc-modal-body {
        padding: 16px;
    }
    
    .lc-modal-footer {
        padding: 14px 16px;
        flex-direction: column;
    }
    
    .lc-modal-footer .lc-btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }
    
    .lc-calendar-day {
        padding: 8px 4px;
    }
    
    .lc-day-number {
        font-size: 12px;
    }
    
    .lc-available-count {
        font-size: 9px;
    }
    
    .lc-day-price {
        font-size: 9px;
    }
    
    #lc-bulk-update-inventory,
    #lc-bulk-update-prices {
        width: 100%;
        margin-top: 8px;
    }
    
    .lc-calendar-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .lc-gallery-item {
        width: 70px;
        height: 70px;
    }
    
    .lc-room-type-upload-btn {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lc-room-type-upload-btn .lc-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Статистика на мобильных */
    .lc-room-types-stats {
        padding: 12px;
        margin-top: 16px;
    }
    
    .lc-room-types-stats h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .lc-room-stats-grid {
        gap: 10px;
    }
    
    .lc-room-stat-card {
        padding: 10px;
    }
    
    .lc-room-stat-name {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .lc-room-stat-details {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 11px;
    }
    
    .lc-room-stat-details span {
        background: rgba(226,196,142,0.1);
        padding: 4px 8px;
        border-radius: 20px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    
    .lc-occupancy-bar {
        height: 4px;
    }
}

/* ============================================
   SMALL MOBILE (max-width: 480px)
   ============================================ */

@media (max-width: 480px) {
    .lc-modal {
        width: 98%;
    }
    
    .lc-modal-body .lc-row {
        flex-direction: column;
    }
    
    .lc-modal-body .lc-col {
        width: 100%;
    }
    
    .lc-calendar-day {
        padding: 6px 2px;
    }
    
    .lc-day-number {
        font-size: 10px;
    }
    
    .lc-day-price {
        font-size: 8px;
    }
    
    .lc-gallery-item {
        width: 60px;
        height: 60px;
    }
    
    .lc-price-preview {
        font-size: 14px;
    }
    
    .lc-price-preview span {
        font-size: 18px;
    }
    
    /* Статистика на маленьких экранах */
    .lc-room-types-stats {
        padding: 10px;
    }
    
    .lc-room-types-stats h4 {
        font-size: 13px;
    }
    
    .lc-room-stat-card {
        padding: 8px;
    }
    
    .lc-room-stat-name {
        font-size: 13px;
    }
    
    .lc-room-stat-details {
        font-size: 10px;
        gap: 6px;
    }
    
    .lc-room-stat-details span {
        padding: 3px 6px;
    }
}

/* ============================================
   TABLET & DESKTOP (min-width: 769px)
   ============================================ */

@media (min-width: 769px) {
    .lc-calendar-actions {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }
    
    #lc-bulk-update-inventory,
    #lc-bulk-update-prices {
        width: auto;
        min-width: 180px;
    }
    
    .lc-room-type-upload-btn {
        flex-direction: row;
    }
}

/* ============================================
   DESKTOP (min-width: 1024px)
   ============================================ */

@media (min-width: 1024px) {
    .lc-modal {
        max-width: 550px;
    }
    
    .lc-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .lc-calendar-day {
        padding: 12px 6px;
    }
    
    .lc-day-number {
        font-size: 14px;
    }
    
    .lc-day-price {
        font-size: 11px;
    }
    
    .lc-gallery-item {
        width: 90px;
        height: 90px;
    }
}
/* ============================================
   ROOM TYPE iCal SECTION
   ============================================ */

.lc-room-type-ical-section {
    margin-top: 20px;
    padding: 16px;
    background: #0B1014;
    border-radius: 12px;
    border: 1px solid rgba(226,196,142,0.2);
}

.lc-room-type-ical-section h4 {
    margin: 0 0 8px;
    color: #E2C48E;
    font-size: 14px;
}

.lc-room-type-ical-section .lc-note {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
}

.lc-room-type-ical-section .lc-form-group {
    margin-bottom: 12px;
}

.lc-room-type-ical-section .lc-ical-input {
    width: 100%;
    padding: 10px 12px;
    background: #1a1f24;
    border: 1px solid #505050;
    border-radius: 8px;
    color: #C2C2C2;
    font-size: 13px;
}

.lc-room-type-ical-section .lc-ical-input:focus {
    outline: none;
    border-color: #E2C48E;
}

.lc-room-type-ical-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.lc-room-type-ical-actions .lc-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

@media (max-width: 768px) {
    .lc-room-type-ical-section {
        padding: 12px;
    }
    
    .lc-room-type-ical-actions {
        flex-direction: column;
    }
    
    .lc-room-type-ical-actions .lc-btn {
        width: 100%;
    }
}