/**
 * Brandr Appointments - Frontend Styles
 */

.brandr-appointments-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 900px;
    margin: 0 auto;
}

.brandr-appointments-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.brandr-calendar-section {
    flex: 1;
    min-width: 320px;
}

.brandr-calendar {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
}

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

.brandr-month-year {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.brandr-nav-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.brandr-nav-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.brandr-calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
}

.brandr-calendar-days-header span {
    font-size: 13px;
    font-weight: 500;
    color: #888;
    padding: 8px;
}

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

.brandr-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
}

.brandr-day:hover:not(.brandr-day-disabled):not(.brandr-day-empty):not(.brandr-day-unavailable) {
    background: #f0f0f0;
}

.brandr-day-empty { cursor: default; }
.brandr-day-disabled { color: #ccc; cursor: not-allowed; }
.brandr-day-available { font-weight: 500; color: #333; }
.brandr-day-unavailable { color: #ccc; cursor: not-allowed; }
.brandr-day-today { border: 2px solid #333; }
.brandr-day-selected { background: #333 !important; color: #fff !important; }

.brandr-timeslots {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    min-height: 100px;
}

.brandr-timeslots-placeholder,
.brandr-timeslots-empty {
    text-align: center;
    color: #888;
    padding: 20px;
}

.brandr-timeslots-loading {
    text-align: center;
    padding: 20px;
}

.brandr-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #eee;
    border-top-color: #333;
    border-radius: 50%;
    animation: brandr-spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes brandr-spin {
    to { transform: rotate(360deg); }
}

.brandr-timeslots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.brandr-timeslot {
    padding: 12px;
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.brandr-timeslot:hover {
    border-color: #333;
    background: #fafafa;
}

.brandr-timeslot-selected {
    background: #333 !important;
    color: #fff !important;
    border-color: #333 !important;
}

.brandr-form-section {
    flex: 1;
    min-width: 280px;
}

.brandr-form-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 5px;
    color: #333;
}

.brandr-form-note {
    color: #888;
    font-size: 13px;
    margin: 0 0 20px;
}

.brandr-form-group {
    margin-bottom: 18px;
}

.brandr-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.brandr-form-group input,
.brandr-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.brandr-form-group input:focus,
.brandr-form-group textarea:focus {
    outline: none;
    border-color: #333;
}

.brandr-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.brandr-form-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.brandr-form-summary h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.brandr-summary-content { font-size: 14px; color: #666; }
.brandr-summary-placeholder { margin: 0; font-style: italic; }

.brandr-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.brandr-summary-item:last-child { border-bottom: none; }
.brandr-summary-label { color: #888; }
.brandr-summary-value { font-weight: 500; color: #333; }

.brandr-form-actions {
    display: flex;
    gap: 10px;
}

.brandr-submit-btn {
    flex: 1;
    padding: 14px 24px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.brandr-submit-btn:hover:not(:disabled) { background: #444; }
.brandr-submit-btn:disabled { background: #ccc; cursor: not-allowed; }

.brandr-cancel-btn {
    padding: 14px 24px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.brandr-cancel-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.brandr-success-message {
    text-align: center;
    padding: 40px 20px;
}

.brandr-success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: #10B981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.brandr-success-message h3 { font-size: 22px; margin: 0 0 10px; }
.brandr-success-message p { color: #666; margin: 0 0 25px; }

.brandr-address-box {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.brandr-address-box h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.brandr-address-box p {
    margin: 0 0 15px;
    color: #333;
    line-height: 1.6;
}

.brandr-maps-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.brandr-maps-link:hover {
    text-decoration: underline;
}

.brandr-new-appointment-btn {
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.brandr-new-appointment-btn:hover { background: #444; }

.brandr-error-message {
    background: #FEE2E2;
    color: #DC2626;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .brandr-appointments-wrapper {
        flex-direction: column;
        padding: 20px;
    }
    
    .brandr-calendar-section,
    .brandr-form-section {
        min-width: 100%;
    }
    
    .brandr-timeslots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .brandr-form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .brandr-timeslots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
