/**
 * Calendar Styles - Refactored
 * 
 * Stílusok az admin és kliens naptár nézetekhez
 */

/* ================================
   CALENDAR CONTAINER
================================ */
.calendar-container,
.client-calendar-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ================================
   CALENDAR HEADER
================================ */
.calendar-header,
.client-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.calendar-header h1,
.client-calendar-header h1 {
    font-size: 28px;
    color: #333;
    margin: 0;
}

.week-info {
    text-align: center;
    flex: 1;
}

.week-info h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 5px 0;
}

.week-number {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* ================================
   NAVIGATION BUTTONS
================================ */
.calendar-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-nav,
.calendar-nav button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

.btn-nav:hover,
.calendar-nav button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-nav:active,
.calendar-nav button:active {
    transform: translateY(0);
}

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* ================================
   LOCATION FILTER
================================ */
.location-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.location-filter label {
    font-weight: 600;
    color: #333;
}

.location-filter select,
#location-select {
    padding: 8px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.location-filter select:hover,
#location-select:hover {
    border-color: #667eea;
}

.location-filter select:focus,
#location-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ================================
   WEEKLY STATISTICS
================================ */
.weekly-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================
   CALENDAR TABLE
================================ */
.calendar-grid {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.calendar-table-wrapper {
    overflow-x: auto;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.calendar-table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    font-weight: 600;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.time-column {
    width: 80px;
    min-width: 80px;
}

.day-column {
    min-width: 150px;
}

.day-column.today {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.day-header {
    text-align: center;
}

.day-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
}

.day-date {
    font-size: 12px;
    opacity: 0.9;
}

.calendar-table tbody tr {
    border-bottom: 1px solid #e9ecef;
}

.calendar-table tbody tr:hover {
    background: #f8f9fa;
}

.time-cell {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: #6c757d;
    background: #f8f9fa;
    border-right: 2px solid #e9ecef;
}

.appointment-cell {
    padding: 10px;
    vertical-align: top;
    min-height: 80px;
    position: relative;
    transition: background 0.3s;
}

.appointment-cell:hover {
    background: #f8f9fa;
}

/* ================================
   APPOINTMENT CARDS
================================ */
.appointment-card {
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.appointment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.appointment-card.full {
    border-color: #dc3545;
    opacity: 0.7;
}

.appointment-time {
    font-weight: bold;
    color: #667eea;
    font-size: 14px;
    margin-bottom: 5px;
}

.appointment-type {
    font-size: 13px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 600;
}

.appointment-capacity {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.appointment-capacity i {
    color: #667eea;
}

.full-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.empty-cell-action {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.appointment-cell:hover .empty-cell-action {
    display: flex;
    opacity: 0.7;
}

.empty-cell-action:hover {
    opacity: 1;
}

/* ================================
   CLIENT CALENDAR STYLES
================================ */
.calendar-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.credit-info {
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.credit-info h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 10px 0;
}

.credit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.credit-item:last-child {
    border-bottom: none;
}

.credit-type {
    font-weight: 600;
    color: #333;
}

.credit-amount {
    font-size: 16px;
    color: #667eea;
    font-weight: bold;
}

.no-credits {
    color: #dc3545;
    margin: 10px 0;
}

.no-credits a {
    color: #667eea;
    text-decoration: underline;
}

/* ================================
   WEEK VIEW & DAYS GRID
================================ */
.week-view {
    margin-top: 20px;
}

.week-header {
    text-align: center;
    margin-bottom: 20px;
}

.week-header h2 {
    font-size: 24px;
    color: #333;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.day-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.day-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.day-card.today {
    border: 3px solid #667eea;
}

.day-card .day-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: center;
}

.day-card.today .day-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.day-card .day-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.day-card .day-date {
    font-size: 24px;
    font-weight: 700;
}

.day-appointments {
    padding: 15px;
    min-height: 200px;
}

.no-appointments {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-appointments i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.day-appointments .appointment-card {
    margin-bottom: 12px;
}

.day-appointments .appointment-card.available {
    border-color: #28a745;
}

.day-appointments .appointment-card.available:hover {
    border-color: #218838;
}

.appointment-location {
    font-size: 12px;
    color: #6c757d;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.book-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

/* ================================
   MODAL STYLES
================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

/* ================================
   FORM STYLES
================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* ================================
   ALERT STYLES
================================ */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

.alert-danger {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

/* ================================
   RESPONSIVE DESIGN
================================ */
@media (max-width: 768px) {
    .calendar-header,
    .client-calendar-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .calendar-nav button,
    .btn-nav {
        width: 100%;
    }
    
    .days-grid {
        grid-template-columns: 1fr;
    }
    
    .weekly-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}
