/* Hotel Detail Page Styles */

/* Header Styles */
.hotel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    border-radius: 20px;
    color: white;
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hotel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    z-index: 1;
}

.hotel-header > * {
    position: relative;
    z-index: 2;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 64px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0;
    background: none;
    border: none;
}

.back-btn:hover {
    opacity: 0.8;
    transform: translateX(-2px);
}

.back-icon {
    font-size: 1.1rem;
    font-weight: normal;
    opacity: 0.9;
}

.hotel-code {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hotel-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 40px 28px;
    align-items: center;
}

.hotel-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 16px 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hotel-description {
    font-size: 1.2rem;
    opacity: 0.95;
    margin: 0 0 32px 0;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hotel-quick-stats {
    display: flex;
    gap: 32px;
    margin-top: 8px;
}

.quick-stat {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.quick-stat:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.quick-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quick-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.hotel-hero-image {
    text-align: center;
}

.hotel-hero-image img {
    max-width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hotel-hero-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.hotel-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 240px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.placeholder-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    opacity: 0.8;
}

.placeholder-text {
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 150px;
    word-wrap: break-word;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Main Content Sections */
.hotel-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hotel-main section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.hotel-main h2 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

/* Side-by-side container */
.side-by-side-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.side-by-side-container .alert-section,
.side-by-side-container .changes-section {
    margin-bottom: 0;
}

.side-by-side-container .alert-card,
.side-by-side-container #priceChangesDisplay {
    height: fit-content;
    max-width: none;
    max-height: 500px;
    overflow-y: auto;
}

/* Calendar and Rooms side-by-side container */
.calendar-rooms-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.calendar-rooms-container .calendar-section,
.calendar-rooms-container .rooms-section {
    margin-bottom: 0;
}

.calendar-rooms-container .rooms-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.calendar-rooms-container .room-card {
    padding: 12px;
}

.calendar-rooms-container .room-header h3 {
    font-size: 1rem;
    line-height: 1.3;
}

.calendar-rooms-container .room-code-subtle {
    font-size: 0.55rem;
    padding: 1px 4px;
}

.calendar-rooms-container .price-amount {
    font-size: 1.25rem;
}



/* Alert Section */
.alert-section {
    margin-bottom: 24px;
}

.alert-card {
    max-width: 480px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
}

.alert-card h2 {
    font-size: 1.25rem;
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.alert-card p {
    margin: 0 0 16px 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.alert-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.8125rem;
}

.form-group input,
.form-group select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 2px rgba(42, 82, 152, 0.1);
}

.form-group small {
    color: #6c757d;
    font-size: 0.6875rem;
}

.form-group select[multiple] {
    min-height: 60px;
}

/* Notification Permission Styles */
.notification-permission {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.permission-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.permission-icon {
    font-size: 1.2rem;
}

.permission-text {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.permission-text.granted {
    color: #28a745;
}

.permission-text.denied {
    color: #dc3545;
}

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

/* Statistics Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stat-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-main {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.stat-sub {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
}

.stat-change.positive {
    background: #d4edda;
    color: #155724;
}

.stat-change.negative {
    background: #f8d7da;
    color: #721c24;
}

.stat-trend {
    margin-top: 8px;
}

.trend-sparkline {
    height: 24px;
    background: #e9ecef;
    border-radius: 4px;
    /* Sparkline will be implemented with JavaScript */
}

.stat-meta {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 4px;
}

/* Calendar Section */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-controls h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #495057;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #495057;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.legend-color.low-price {
    background: #d4edda;
}

.legend-color.medium-price {
    background: #fff3cd;
}

.legend-color.high-price {
    background: #f8d7da;
}

.legend-color.no-availability {
    background: #e9ecef;
}

.calendar-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    max-width: 600px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px;
    font-size: 0.85rem;
    min-height: 52px;
    max-height: 65px;
}

.calendar-day:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.low-price {
    background: #d4edda;
    border-color: #c3e6cb;
}

.calendar-day.medium-price {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.calendar-day.high-price {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.calendar-day.no-availability {
    background: #e9ecef;
    border-color: #ced4da;
    cursor: not-allowed;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.calendar-day-price {
    font-size: 0.75rem;
    color: #495057;
    font-weight: 600;
}

.calendar-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    font-size: 0.875rem;
    color: #495057;
}

/* Rooms Section */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.room-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.room-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
    hyphens: auto;
    flex-grow: 1;
    margin-right: 8px;
}

.room-code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
}

.room-code-subtle {
    background: rgba(108, 117, 125, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.6rem;
    font-weight: 400;
    color: #adb5bd;
    flex-shrink: 0;
    opacity: 0.7;
}

.room-price {
    margin-bottom: 12px;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
}

.price-period {
    font-size: 0.875rem;
    color: #6c757d;
    margin-left: 4px;
}

.price-unavailable {
    font-size: 1rem;
    color: #dc3545;
    font-weight: 500;
}

.room-details p {
    font-size: 0.875rem;
    color: #495057;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.room-trend {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trend {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.trend.up {
    background: #f8d7da;
    color: #721c24;
}

.trend.down {
    background: #d4edda;
    color: #155724;
}

.trend.stable {
    background: #e9ecef;
    color: #495057;
}

.trend-period {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Changes Section */
.changes-container, #priceChangesDisplay {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: fit-content;
    max-height: 500px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fafafa;
}

/* Ensure price change lines fit properly in the scrollable container */
#priceChangesDisplay .price-change-line {
    margin-bottom: 6px;
}

#priceChangesDisplay .price-change-line:last-child {
    margin-bottom: 0;
}

.changes-container::-webkit-scrollbar, #priceChangesDisplay::-webkit-scrollbar {
    width: 6px;
}

.changes-container::-webkit-scrollbar-track, #priceChangesDisplay::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.changes-container::-webkit-scrollbar-thumb, #priceChangesDisplay::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.changes-container::-webkit-scrollbar-thumb:hover, #priceChangesDisplay::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.change-item {
    display: grid;
    grid-template-columns: 90px minmax(140px, 2fr) 160px auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    margin: 8px 8px 0 8px;
    background: #ffffff;
    border-radius: 6px;
    border-left: 3px solid #6c757d;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.change-item:last-child {
    margin-bottom: 8px;
}

.change-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.change-item.increase {
    border-left-color: #dc3545;
    background: #fef5f5;
}

.change-item.decrease {
    border-left-color: #28a745;
    background: #f5fcf5;
}

    .change-date {
        font-size: 0.875rem;
        font-weight: 600;
        color: #495057;
        padding-top: 2px;
    }

    .change-room {
        font-size: 0.85rem;
        color: #6c757d;
        font-weight: 500;
        line-height: 1.3;
        word-break: break-word;
        hyphens: auto;
        padding-top: 2px;
    }

.change-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    padding-top: 2px;
}

.old-price {
    color: #6c757d;
    text-decoration: line-through;
}

.arrow {
    color: #adb5bd;
}

.new-price {
    color: #495057;
    font-weight: 600;
}

.change-amount {
    font-weight: 700;
    text-align: center;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    min-width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    align-self: start;
}

.change-amount.positive {
    color: #28a745;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.change-amount.negative {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.notification.error {
    background: #dc3545;
}

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.notification button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2a5298;
    color: white;
}

.btn-primary:hover {
    background: #1e3c72;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #495057;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hotel-header {
        margin-bottom: 24px;
        border-radius: 16px;
    }
    
    .header-nav {
        padding: 20px 24px;
        flex-direction: row;
        gap: 16px;
        min-height: 56px;
    }
    
    .back-btn {
        font-size: 0.9rem;
        gap: 8px;
    }
    
    .back-icon {
        font-size: 1rem;
    }
    
    .hotel-code {
        font-size: 0.8rem;
    }
    
    .hotel-hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
        padding: 32px 20px;
    }
    
    .hotel-title {
        font-size: 2.2rem;
    }
    
    .hotel-description {
        font-size: 1.1rem;
        margin-bottom: 24px;
    }
    
    .hotel-quick-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .quick-stat {
        padding: 12px 16px;
        min-width: 120px;
    }
    
    .quick-stat-value {
        font-size: 1.5rem;
    }
    
    .quick-stat-label {
        font-size: 0.8rem;
    }
    
    .hotel-hero-image img {
        height: 200px;
        border-radius: 16px;
    }
    
    .hotel-placeholder {
        height: 200px;
        border-radius: 16px;
    }
    
    .side-by-side-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calendar-rooms-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calendar-rooms-container .rooms-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-legend {
        justify-content: center;
    }
    
    .rooms-grid {
        grid-template-columns: 1fr;
    }
    
    .change-item {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
        align-items: center;
        margin: 4px;
    }
    
    .change-date,
    .change-room,
    .change-prices {
        padding-top: 0;
    }
    
    .changes-container, #priceChangesDisplay {
        height: fit-content;
        max-height: 400px;
        padding: 8px;
    }
    
    .change-amount {
        justify-self: center;
        margin-top: 4px;
        align-self: center;
    }
    
    .calendar-controls {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hotel-header {
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .header-nav {
        padding: 16px 20px;
        gap: 12px;
        min-height: 52px;
    }
    
    .back-btn {
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .back-icon {
        font-size: 0.95rem;
    }
    
    .hotel-code {
        font-size: 0.75rem;
    }
    
    .hotel-hero {
        padding: 24px 16px;
        gap: 20px;
    }
    
    .hotel-title {
        font-size: 1.8rem;
    }
    
    .hotel-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .hotel-quick-stats {
        gap: 12px;
    }
    
    .quick-stat {
        padding: 10px 12px;
        min-width: 100px;
    }
    
    .quick-stat-value {
        font-size: 1.3rem;
    }
    
    .quick-stat-label {
        font-size: 0.75rem;
    }
    
    .hotel-hero-image img {
        height: 180px;
        border-radius: 12px;
    }
    
    .hotel-placeholder {
        height: 180px;
        border-radius: 12px;
    }
    
    .side-by-side-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .calendar-rooms-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .calendar-rooms-container .rooms-grid {
        grid-template-columns: 1fr;
    }
    
    .room-header {
        align-items: center;
        gap: 8px;
    }
    
    .room-header h3 {
        font-size: 1rem;
        margin-right: 4px;
    }
    
    .room-code-subtle {
        font-size: 0.55rem;
        padding: 1px 4px;
    }
    
    .notification-permission {
        padding: 8px;
    }
    
    .permission-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .btn-small {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .hotel-main section {
        padding: 12px;
        margin: 0 -4px;
        border-radius: 8px;
    }
    
    .alert-card {
        max-width: none;
        padding: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .calendar-grid {
        gap: 3px;
    }
    
    .calendar-day {
        padding: 2px;
        font-size: 0.625rem;
        min-height: 32px;
    }
    
    .calendar-day-price {
        font-size: 0.5rem;
    }
    
    .notification {
        left: 16px;
        right: 16px;
        top: 16px;
    }
} 