/* Bicycle Booking System - Frontend Styles */

.bbs-booking-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.bbs-booking-form {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.bbs-booking-form h2 {
    margin: 0 0 30px 0;
    font-size: 28px;
    color: #333;
    text-align: center;
}

.bbs-booking-form h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #444;
    border-bottom: 2px solid #7BA429;
    padding-bottom: 10px;
}

.bbs-form-section {
    margin-bottom: 40px;
}

/* Service Selection */
.bbs-service-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.bbs-service-option {
    cursor: pointer;
    display: block;
}

.bbs-service-option input[type="radio"] {
    display: none;
}

.bbs-service-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.bbs-service-card:hover {
    border-color: #7BA429;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.15);
}

.bbs-service-option input[type="radio"]:checked + .bbs-service-card {
    border-color: #7BA429;
    background: #e8f4f8;
    box-shadow: 0 4px 12px rgba(0,115,170,0.2);
}

.bbs-service-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.bbs-service-price {
    font-size: 24px;
    font-weight: 700;
    color: #7BA429;
}

/* Time Slot Selection */
#bbs-time-slot-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.bbs-time-slot-option {
    cursor: pointer;
    display: block;
}

.bbs-time-slot-option input[type="radio"] {
    display: none;
}

.bbs-time-slot-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.bbs-time-slot-card:hover {
    border-color: #7BA429;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.15);
}

.bbs-time-slot-option input[type="radio"]:checked + .bbs-time-slot-card {
    border-color: #7BA429;
    background: #e8f4f8;
    box-shadow: 0 4px 12px rgba(0,115,170,0.2);
}

.bbs-time-slot-option input[type="radio"]:disabled + .bbs-time-slot-card {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.bbs-time-slot-option input[type="radio"]:disabled + .bbs-time-slot-card:hover {
    transform: none;
    border-color: #ddd;
    box-shadow: none;
}

.bbs-slot-time {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.bbs-slot-desc {
    font-size: 14px;
    color: #666;
}

.bbs-time-slot-card.bbs-slot-unavailable {
    opacity: 0.4;
    cursor: not-allowed;
}

.bbs-time-slot-card.bbs-slot-unavailable::after {
    content: ' (Unavailable)';
    display: block;
    font-size: 12px;
    color: #c62828;
    margin-top: 5px;
}

/* Calendar */
#bbs-calendar-container {
    max-width: 500px;
    margin: 0 auto;
}

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

#bbs-calendar-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.bbs-nav-btn {
    background: #7BA429;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

.bbs-nav-btn:hover {
    background: #005a87;
}

.bbs-calendar-grid {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.bbs-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #7BA429;
    color: #fff;
}

.bbs-calendar-weekdays div {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

#bbs-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff;
}

.bbs-calendar-day {
    padding: 15px;
    text-align: center;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bbs-calendar-day:hover:not(.bbs-disabled):not(.bbs-booked) {
    background: #f0f0f0;
}

.bbs-calendar-day.bbs-other-month {
    color: #ccc;
    background: #fafafa;
}

.bbs-calendar-day.bbs-disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f9f9f9;
}

.bbs-calendar-day.bbs-booked {
    background: #ffebee;
    color: #c62828;
    cursor: not-allowed;
    position: relative;
}

.bbs-calendar-day.bbs-booked::after {
    content: '✕';
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 10px;
}

.bbs-calendar-day.bbs-partial {
    background: #fff3e0;
    border: 2px solid #ff9800;
    position: relative;
}

.bbs-calendar-day.bbs-partial:hover {
    background: #ffe0b2;
}

.bbs-slot-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 2px;
    line-height: 1;
}

.bbs-slot-indicator.bbs-am-booked {
    background: #2196f3;
    color: white;
}

.bbs-slot-indicator.bbs-pm-booked {
    background: #ff9800;
    color: white;
}

.bbs-calendar-day.bbs-selected {
    background: #7BA429;
    color: #fff;
    font-weight: 700;
}

.bbs-calendar-day.bbs-today {
    font-weight: 600;
    background: #fff3cd;
}

.bbs-calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 14px;
}

.bbs-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bbs-legend-box {
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.bbs-legend-box.bbs-available {
    background: #fff;
}

.bbs-legend-box.bbs-partial-legend {
    background: #fff3e0;
    border: 2px solid #ff9800;
}

.bbs-legend-box.bbs-booked {
    background: #ffebee;
}

.bbs-legend-box.bbs-selected {
    background: #7BA429;
}

/* Form Fields */
.bbs-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.bbs-form-group {
    margin-bottom: 20px;
}

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

.bbs-form-group input[type="text"],
.bbs-form-group input[type="email"],
.bbs-form-group input[type="tel"],
.bbs-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.bbs-form-group input:focus,
.bbs-form-group textarea:focus {
    outline: none;
    border-color: #7BA429;
}

.bbs-form-group textarea {
    resize: vertical;
}

.bbs-field-description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Mechanic Selection */
.bbs-mechanic-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.bbs-mechanic-option {
    cursor: pointer;
    display: block;
}

.bbs-mechanic-option input[type="radio"] {
    display: none;
}

.bbs-mechanic-card {
    border: 3px solid #ddd;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bbs-mechanic-card:hover {
    border-color: #7BA429;
    box-shadow: 0 4px 12px rgba(123, 164, 41, 0.2);
    transform: translateY(-2px);
}

.bbs-mechanic-option input[type="radio"]:checked + .bbs-mechanic-card {
    border-color: #7BA429;
    background: #f8faf5;
    box-shadow: 0 4px 12px rgba(123, 164, 41, 0.3);
}

.bbs-mechanic-avatar {
    font-size: 48px;
    margin-bottom: 10px;
    line-height: 1;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bbs-mechanic-avatar.bbs-no-preference {
    font-size: 40px;
    opacity: 0.6;
}

.bbs-mechanic-avatar.bbs-no-preference .avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: #999;
}

/* Avatar Components */
.avatar-head {
    position: relative;
    width: 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.face {
    width: 50px;
    height: 60px;
    background: #ffd7b5;
    border-radius: 50% 50% 45% 45%;
    position: relative;
    z-index: 2;
}

.face.bald {
    border-radius: 50% 50% 45% 45%;
}

.face::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 4px;
    background: #333;
    border-radius: 50%;
}

/* Hair Styles */
.hair {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    height: 35px;
    border-radius: 50% 50% 0 0;
    z-index: 1;
}

.brown-hair {
    background: #5d4037;
}

.blond-hair {
    background: #f4d03f;
}

.dark-blond-hair {
    background: #d4a017;
}

.hair.short {
    height: 25px;
}

/* Cap */
.cap {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 25px;
    background: #2c3e50;
    border-radius: 50% 50% 0 0;
    z-index: 3;
}

.cap::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 8px;
    background: #2c3e50;
    border-radius: 4px;
}

/* Beanie */
.beanie {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 30px;
    background: #34495e;
    border-radius: 50% 50% 0 0;
    z-index: 3;
}

.beanie::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 6px;
    background: #2c3e50;
    border-radius: 3px;
}

.beanie::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: #34495e;
    border-radius: 50%;
}

/* Beards */
.beard {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.big-beard {
    width: 42px;
    height: 30px;
    background: #5d4037;
    border-radius: 0 0 50% 50%;
}

.big-beard::before,
.big-beard::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 25px;
    background: #5d4037;
    border-radius: 50%;
}

.big-beard::before {
    left: -8px;
    top: 5px;
}

.big-beard::after {
    right: -8px;
    top: 5px;
}

.short-beard {
    width: 36px;
    height: 18px;
    background: #8b6914;
    border-radius: 0 0 50% 50%;
}

.short-beard::before,
.short-beard::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 16px;
    background: #8b6914;
    border-radius: 50%;
}

.short-beard::before {
    left: -6px;
    top: 2px;
}

.short-beard::after {
    right: -6px;
    top: 2px;
}

.bbs-mechanic-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .bbs-mechanic-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Submit Button */
.bbs-form-actions {
    text-align: center;
    margin-top: 30px;
}

.bbs-submit-btn {
    background: #7BA429;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.bbs-submit-btn:hover {
    background: #005a87;
}

.bbs-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.bbs-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

.bbs-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bbs-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bbs-error-message {
    color: #721c24;
    font-size: 14px;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .bbs-booking-form {
        padding: 20px;
    }
    
    .bbs-service-options {
        grid-template-columns: 1fr;
    }
    
    .bbs-form-row {
        grid-template-columns: 1fr;
    }
    
    .bbs-calendar-legend {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
