/**
 * Classic Cuts Booking Form Styles
 * Matches the barber theme styling (dark with gold accents)
 */

/* Variables matching barber theme */
:root {
    --ccb-primary: #1a1a1a;
    --ccb-secondary: #242424;
    --ccb-accent: #c9a96e;
    --ccb-accent-light: #d4b97a;
    --ccb-text: #e8e8e8;
    --ccb-text-muted: #888;
    --ccb-border: #333;
    --ccb-success: #4caf50;
    --ccb-error: #f44336;
}

/* Main Wrapper */
.ccb-booking-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

/* Form Container */
.ccb-booking-form-container {
    background: linear-gradient(135deg, var(--ccb-secondary) 0%, var(--ccb-primary) 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--ccb-border);
    position: relative;
    overflow: hidden;
}

.ccb-booking-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ccb-accent), var(--ccb-accent-light), var(--ccb-accent));
}

/* Title */
.ccb-title {
    font-family: 'Georgia', serif;
    font-size: 2rem;
    font-weight: normal;
    color: var(--ccb-accent);
    text-align: center;
    margin: 0 0 10px;
    letter-spacing: 2px;
}

.ccb-subtitle {
    text-align: center;
    color: var(--ccb-text-muted);
    font-size: 1rem;
    margin: 0 0 35px;
    font-style: italic;
}

/* Form Styles */
.ccb-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ccb-form-row {
    display: flex;
    gap: 20px;
}

.ccb-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .ccb-two-col {
        grid-template-columns: 1fr;
    }
}

.ccb-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ccb-form-group label {
    color: var(--ccb-text);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ccb-label-icon {
    font-size: 1rem;
}

.ccb-required {
    color: var(--ccb-accent);
}

/* Input Styles */
.ccb-form input[type="text"],
.ccb-form input[type="email"],
.ccb-form input[type="tel"],
.ccb-form input[type="date"],
.ccb-form select,
.ccb-form textarea {
    background-color: var(--ccb-primary);
    border: 2px solid var(--ccb-border);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--ccb-text);
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.ccb-form input:focus,
.ccb-form select:focus,
.ccb-form textarea:focus {
    outline: none;
    border-color: var(--ccb-accent);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.2);
}

.ccb-form input::placeholder,
.ccb-form textarea::placeholder {
    color: #666;
}

.ccb-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c9a96e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.ccb-form select option {
    background-color: var(--ccb-primary);
    color: var(--ccb-text);
}

.ccb-form select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ccb-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Date Input Styling */
.ccb-form input[type="date"] {
    cursor: pointer;
}

.ccb-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(75%) sepia(20%) saturate(600%) hue-rotate(10deg);
    cursor: pointer;
}

/* Submit Button */
.ccb-submit-btn {
    background: linear-gradient(135deg, var(--ccb-accent) 0%, var(--ccb-accent-light) 50%, var(--ccb-accent) 100%);
    background-size: 200% 200%;
    color: var(--ccb-primary);
    border: none;
    border-radius: 8px;
    padding: 18px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.ccb-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.ccb-submit-btn:hover::before {
    left: 100%;
}

.ccb-submit-btn:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(201, 169, 110, 0.4);
}

.ccb-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ccb-btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.ccb-submit-btn:hover .ccb-btn-icon {
    transform: translateX(5px);
}

.ccb-btn-loading {
    display: none;
}

.ccb-submit-btn.loading .ccb-btn-text,
.ccb-submit-btn.loading .ccb-btn-icon {
    display: none;
}

.ccb-submit-btn.loading .ccb-btn-loading {
    display: block;
}

/* Spinner Animation */
.ccb-spinner {
    width: 24px;
    height: 24px;
    animation: rotate 1s linear infinite;
}

.ccb-spinner circle {
    stroke: var(--ccb-primary);
    stroke-dasharray: 80, 200;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 200;
        stroke-dashoffset: -35px;
    }
    100% {
        stroke-dasharray: 90, 200;
        stroke-dashoffset: -125px;
    }
}

/* Form Notice */
.ccb-form-notice {
    text-align: center;
    padding: 20px;
    margin-top: 10px;
    border-top: 1px solid var(--ccb-border);
}

.ccb-form-notice p {
    margin: 5px 0;
    color: var(--ccb-text-muted);
    font-size: 0.9rem;
}

/* Success Message */
.ccb-success {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease;
}

.ccb-success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.ccb-success h3 {
    color: var(--ccb-accent);
    font-size: 1.8rem;
    margin: 0 0 15px;
    font-weight: normal;
}

.ccb-success p {
    color: var(--ccb-text-muted);
    font-size: 1.1rem;
    margin: 0 0 30px;
}

.ccb-book-another {
    background: transparent;
    border: 2px solid var(--ccb-accent);
    color: var(--ccb-accent);
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccb-book-another:hover {
    background: var(--ccb-accent);
    color: var(--ccb-primary);
}

/* Error Message */
.ccb-error {
    background-color: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--ccb-error);
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: shake 0.5s ease;
}

.ccb-error-icon {
    font-size: 1.5rem;
}

.ccb-error-text {
    color: #ff6b6b;
    margin: 0;
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Time Slots Grid (if needed in future) */
.ccb-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.ccb-time-slot {
    background: var(--ccb-primary);
    border: 2px solid var(--ccb-border);
    color: var(--ccb-text);
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccb-time-slot:hover {
    border-color: var(--ccb-accent);
}

.ccb-time-slot.selected {
    background: var(--ccb-accent);
    color: var(--ccb-primary);
    border-color: var(--ccb-accent);
}

.ccb-time-slot.unavailable {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ccb-booking-form-container {
        padding: 25px;
        border-radius: 12px;
    }
    
    .ccb-title {
        font-size: 1.6rem;
    }
    
    .ccb-subtitle {
        font-size: 0.9rem;
    }
    
    .ccb-form input[type="text"],
    .ccb-form input[type="email"],
    .ccb-form input[type="tel"],
    .ccb-form input[type="date"],
    .ccb-form select,
    .ccb-form textarea {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .ccb-submit-btn {
        padding: 16px 25px;
        font-size: 1rem;
    }
}
