<?php
/**
 * Booking Pages Styles
 *
 * @package Freelance_Studio
 */

if (!defined('ABSPATH')) {
    exit;
}

$primary_color = get_option('fs_invoice_primary_color', '#2271b1');
?>
<style>
:root {
    --fs-primary: <?php echo esc_attr($primary_color); ?>;
    --fs-primary-dark: color-mix(in srgb, <?php echo esc_attr($primary_color); ?> 80%, black);
    --fs-success: #059669;
    --fs-danger: #dc2626;
    --fs-gray-50: #f9fafb;
    --fs-gray-100: #f3f4f6;
    --fs-gray-200: #e5e7eb;
    --fs-gray-300: #d1d5db;
    --fs-gray-400: #9ca3af;
    --fs-gray-500: #6b7280;
    --fs-gray-600: #4b5563;
    --fs-gray-700: #374151;
    --fs-gray-800: #1f2937;
    --fs-gray-900: #111827;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.fs-booking-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--fs-gray-100);
    color: var(--fs-gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

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

.fs-booking-header {
    text-align: center;
    margin-bottom: 30px;
}

.fs-booking-logo {
    max-height: 60px;
    max-width: 200px;
    margin-bottom: 20px;
}

.fs-booking-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--fs-gray-900);
    margin-bottom: 10px;
}

.fs-booking-description {
    color: var(--fs-gray-600);
    font-size: 16px;
}

.fs-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--fs-gray-600);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
}

.fs-back-link:hover {
    color: var(--fs-primary);
}

/* Meeting Types List */
.fs-meeting-types-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fs-meeting-type-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--fs-gray-200);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.fs-meeting-type-item:hover {
    border-color: var(--fs-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.fs-meeting-type-color {
    width: 6px;
    height: 60px;
    background: var(--type-color, var(--fs-primary));
    border-radius: 3px;
    margin-right: 20px;
    flex-shrink: 0;
}

.fs-meeting-type-content {
    flex: 1;
}

.fs-meeting-type-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--fs-gray-900);
    margin-bottom: 5px;
}

.fs-type-description {
    color: var(--fs-gray-600);
    font-size: 14px;
    margin-bottom: 10px;
}

.fs-type-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.fs-type-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--fs-gray-500);
}

.fs-type-meta svg {
    color: var(--fs-gray-400);
}

.fs-type-price {
    font-weight: 600;
    color: var(--fs-gray-700) !important;
}

.fs-meeting-type-arrow {
    color: var(--fs-gray-400);
    margin-left: 15px;
}

.fs-meeting-type-item:hover .fs-meeting-type-arrow {
    color: var(--fs-primary);
}

/* Select Time Layout */
.fs-booking-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .fs-booking-layout {
        grid-template-columns: 1fr;
    }
}

.fs-booking-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.fs-meeting-info {
    background: #fff;
    border: 1px solid var(--fs-gray-200);
    border-radius: 12px;
    padding: 20px;
}

.fs-meeting-color {
    width: 100%;
    height: 4px;
    background: var(--type-color, var(--fs-primary));
    border-radius: 2px;
    margin-bottom: 15px;
}

.fs-meeting-info h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.fs-meeting-info p {
    color: var(--fs-gray-600);
    font-size: 14px;
    margin-bottom: 15px;
}

.fs-meeting-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fs-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--fs-gray-600);
}

.fs-detail svg {
    color: var(--fs-gray-400);
    flex-shrink: 0;
}

.fs-detail.fs-price {
    font-weight: 600;
    color: var(--fs-gray-700);
}

/* Booking Main */
.fs-booking-main {
    background: #fff;
    border: 1px solid var(--fs-gray-200);
    border-radius: 12px;
    padding: 30px;
}

.fs-booking-step h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.fs-timezone-note {
    color: var(--fs-gray-500);
    font-size: 13px;
    margin-bottom: 20px;
}

/* Timezone Selector */
.fs-timezone-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--fs-gray-50);
    border: 1px solid var(--fs-gray-200);
    border-radius: 8px;
    margin-bottom: 20px;
}

.fs-timezone-selector label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--fs-gray-600);
    white-space: nowrap;
}

.fs-timezone-selector label svg {
    color: var(--fs-gray-400);
}

.fs-timezone-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--fs-gray-300);
    border-radius: 6px;
    font-size: 14px;
    color: var(--fs-gray-800);
    background: #fff;
    cursor: pointer;
    min-width: 0;
}

.fs-timezone-select:focus {
    outline: none;
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(var(--fs-primary), 0.1);
}

/* Date Picker */
.fs-date-picker {
    margin-top: 20px;
}

.fs-date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.fs-date-nav span {
    font-weight: 500;
}

.fs-date-nav-btn {
    background: none;
    border: 1px solid var(--fs-gray-300);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--fs-gray-600);
    transition: all 0.2s;
}

.fs-date-nav-btn:hover:not(:disabled) {
    border-color: var(--fs-primary);
    color: var(--fs-primary);
}

.fs-date-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fs-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.fs-date-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: #fff;
    border: 1px solid var(--fs-gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.fs-date-btn:hover:not(:disabled) {
    border-color: var(--fs-primary);
    background: var(--fs-gray-50);
}

.fs-date-btn.fs-date-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--fs-gray-100);
}

.fs-day-name {
    font-size: 12px;
    color: var(--fs-gray-500);
    text-transform: uppercase;
}

.fs-day-num {
    font-size: 18px;
    font-weight: 600;
    color: var(--fs-gray-900);
}

/* Time Slots */
.fs-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.fs-time-btn {
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--fs-gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.fs-time-btn:hover {
    border-color: var(--fs-primary);
    background: var(--fs-primary);
    color: #fff;
}

.fs-time-btn .fs-time-primary {
    font-weight: 600;
}

.fs-time-btn .fs-time-note {
    font-size: 11px;
    opacity: 0.8;
}

.fs-time-btn:hover .fs-time-note {
    opacity: 1;
}

.fs-loading, .fs-no-slots, .fs-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--fs-gray-500);
}

.fs-error {
    color: var(--fs-danger);
}

/* Form */
.fs-booking-form {
    margin-top: 20px;
}

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

.fs-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--fs-gray-700);
    margin-bottom: 6px;
}

.fs-form-group .required {
    color: var(--fs-danger);
}

.fs-form-group input,
.fs-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--fs-gray-300);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.fs-form-group input:focus,
.fs-form-group textarea:focus {
    outline: none;
    border-color: var(--fs-primary);
}

/* Checkbox styling */
.fs-checkbox-group {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--fs-gray-200);
}

.fs-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400 !important;
    color: var(--fs-gray-600) !important;
    font-size: 13px !important;
}

.fs-checkbox-label input[type="checkbox"] {
    width: 18px !important;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--fs-primary);
    cursor: pointer;
}

.fs-checkbox-label span {
    line-height: 1.4;
}

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

/* Buttons */
.fs-btn-primary,
.fs-btn-secondary,
.fs-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.fs-btn-primary {
    background: var(--fs-primary);
    color: #fff;
}

.fs-btn-primary:hover {
    background: var(--fs-primary-dark);
}

.fs-btn-secondary {
    background: #fff;
    border: 1px solid var(--fs-gray-300);
    color: var(--fs-gray-700);
}

.fs-btn-secondary:hover {
    background: var(--fs-gray-50);
    border-color: var(--fs-gray-400);
}

.fs-btn-danger {
    background: var(--fs-danger);
    color: #fff;
}

.fs-btn-danger:hover {
    background: #b91c1c;
}

/* Confirmation Page */
.fs-confirmation-card,
.fs-cancel-card,
.fs-cancelled-card {
    background: #fff;
    border: 1px solid var(--fs-gray-200);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.fs-confirmation-icon {
    color: var(--fs-success);
    margin-bottom: 20px;
}

.fs-cancelled-icon {
    color: var(--fs-gray-400);
    margin-bottom: 20px;
}

.fs-confirmation-card h1,
.fs-cancel-card h1,
.fs-cancelled-card h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.fs-confirmation-intro {
    color: var(--fs-gray-600);
    margin-bottom: 30px;
}

.fs-booking-details-card {
    background: var(--fs-gray-50);
    border-radius: 10px;
    padding: 25px;
    text-align: left;
    margin-bottom: 25px;
}

.fs-booking-color-bar {
    width: 60px;
    height: 4px;
    background: var(--type-color, var(--fs-primary));
    border-radius: 2px;
    margin-bottom: 15px;
}

.fs-booking-details-card h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.fs-booking-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 15px;
}

.fs-booking-detail svg {
    color: var(--fs-gray-400);
    flex-shrink: 0;
}

.fs-timezone {
    font-size: 13px;
    color: var(--fs-gray-400);
}

.fs-location-details {
    background: #fff;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
    font-size: 14px;
    color: var(--fs-gray-600);
}

.fs-confirmation-actions {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--fs-gray-200);
}

.fs-confirmation-actions p {
    color: var(--fs-gray-500);
    font-size: 14px;
    margin-bottom: 10px;
}

/* Cancel Form */
.fs-cancel-form {
    text-align: left;
    margin-top: 25px;
}

.fs-cancel-form p {
    margin-bottom: 20px;
    color: var(--fs-gray-600);
}

/* Footer */
.fs-booking-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--fs-gray-200);
}

.fs-booking-footer p {
    color: var(--fs-gray-500);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .fs-booking-container {
        padding: 20px 15px;
    }
    
    .fs-date-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
    }
    
    .fs-date-btn {
        padding: 8px 4px;
    }
    
    .fs-day-name {
        font-size: 10px;
    }
    
    .fs-day-num {
        font-size: 14px;
    }
    
    .fs-time-slots {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .fs-form-actions {
        flex-direction: column;
    }
    
    .fs-btn-primary,
    .fs-btn-secondary,
    .fs-btn-danger {
        width: 100%;
    }
}
</style>
