/* Butiken Booking System Styles */

#butiken-booking-system {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Lösenordsinmatning */
#password-check {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    text-align: center;
}

#password-check label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
}

#booking-password {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    margin-right: 10px;
    width: 200px;
}

#check-password {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

#check-password:hover {
    background: #005a87;
}

/* Kalender */
#calendar-container {
    margin: 30px 0;
}

#calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

#calendar-header h4 {
    margin: 0;
    font-size: 1.5em;
    color: #2c3e50;
}

#calendar-header button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
}

#calendar-header button:hover {
    background: #005a87;
}

.butiken-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-day {
    background: white;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover {
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.calendar-day.unavailable {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.calendar-day.unavailable:hover {
    transform: none;
    background-color: #f8f9fa;
}

.calendar-day.weekend {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.calendar-day.weekend:hover {
    background-color: #fff3cd;
}

.calendar-day.selected {
    background-color: #007cba;
    color: white;
    box-shadow: 0 0 0 2px #007cba;
}

.calendar-day.has-booking {
    border-left: 4px solid #f44336;
}

.calendar-day.has-booking::after {
    content: "●";
    color: #f44336;
    position: absolute;
    bottom: 3px;
    right: 3px;
    font-size: 12px;
    font-weight: bold;
}

.calendar-day.partially-booked {
    border-left: 4px solid #ff9800;
    position: relative;
}

.calendar-day.partially-booked::after {
    content: "◐";
    color: #ff9800;
    position: absolute;
    bottom: 3px;
    right: 3px;
    font-size: 12px;
    font-weight: bold;
}

.calendar-day.fully-booked {
    border-left: 4px solid #f44336;
    position: relative;
}

.calendar-day.fully-booked::after {
    content: "●";
    color: #f44336;
    position: absolute;
    bottom: 3px;
    right: 3px;
    font-size: 12px;
    font-weight: bold;
}

/* Veckodagshuvuden */
.butiken-calendar > div:nth-child(-n+7) {
    background-color: #34495e;
    color: white;
    font-weight: bold;
    padding: 10px;
    font-size: 0.9em;
}

/* Bokningsdetaljer - container utan egen bakgrund */
#booking-details {
    padding: 0;
    margin-top: 20px;
}

#booking-details > h4 {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    border-left: 4px solid #007cba;
    margin: 0 0 20px 0;
    color: #2c3e50;
}

#booking-details h4 {
    color: #2c3e50;
    margin-top: 0;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

/* Befintliga bokningar */
#existing-bookings {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    border-left: 4px solid #6c757d;
    margin-bottom: 0;
}

#existing-bookings h5 {
    color: #495057;
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

/* Ny bokning-sektion */
#new-booking-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    border-left: 4px solid #28a745;
    margin-top: 20px;
}

#new-booking-section h5 {
    color: #495057;
    margin-bottom: 20px;
    margin-top: 0;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

#day-bookings-list div {
    background: white;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin: 5px 0;
    font-size: 0.9em;
}

/* Formulär */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input, 
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Radioknappar för bokningstyp */
input[type="radio"] {
    width: auto !important;
    margin-right: 8px;
    margin-bottom: 10px;
}

.form-group label[for="type-hourly"], 
.form-group label[for="type-daily"] {
    display: inline-block;
    margin-right: 20px;
    margin-left: 5px;
    font-weight: normal;
}

/* Kostnadskalkylering */
#cost-calculation {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
    margin: 20px 0;
    text-align: center;
    font-size: 1.1em;
}

/* Varningsmeddelanden */
#booking-rules-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

#password-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* Skicka-knapp */
#booking-form button[type="submit"] {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

#booking-form button[type="submit"]:hover {
    background: #218838;
}

#booking-form button[type="submit"]:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Resultatmeddelanden */
#booking-result {
    margin: 20px 0;
}

#booking-result div {
    border-radius: 5px;
    font-size: 1em;
}

/* Responsiv design */
@media (max-width: 768px) {
    #butiken-booking-system {
        padding: 0 15px;
    }
    
    .butiken-calendar {
        font-size: 0.9em;
    }
    
    .calendar-day {
        padding: 10px 5px;
        min-height: 40px;
    }
    
    #booking-details {
        padding: 15px;
    }
    
    .form-group input, 
    .form-group select {
        padding: 10px;
    }
    
    #calendar-header {
        padding: 0 10px;
    }
    
    #calendar-header h4 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .butiken-calendar {
        font-size: 0.8em;
    }
    
    .calendar-day {
        padding: 8px 3px;
        min-height: 35px;
    }
    
    #calendar-header h4 {
        font-size: 1.1em;
    }
    
    #calendar-header button {
        padding: 8px 12px;
        font-size: 14px;
    }
}