:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
    --border-color: #dcdde1;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

#booking-plugin {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.booking-form {
    max-width: 600px;
    margin: 0 auto;
}

h1, h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #357abd;
}

.available-slots {
    margin-top: 2rem;
}

#slots-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.slot {
    padding: 0.5rem;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.slot.unavailable {
    background: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-align: center;
    max-width: 300px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out forwards;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.message.success {
    background-color: var(--success-color);
    color: white;
}

.message.error {
    background-color: var(--error-color);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.message.fade-out {
    animation: fadeOut 0.3s ease-in forwards;
}

.helper-text {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
    opacity: 0.8;
}

.documentation {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
    transition: background-color 0.2s;
}

.faq-question:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 1rem;
}

pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: 'Courier New', Courier, monospace;
}

/* Required field indicator */
.required-field::after {
    content: '*';
    color: var(--error-color);
    margin-left: 4px;
}

/* Invalid field animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-15px);
    }
    40% {
        transform: translateX(15px);
    }
    60% {
        transform: translateX(-10px);
    }
    80% {
        transform: translateX(10px);
    }
}

.shake {
    animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Invalid field highlight */
.form-group.invalid input,
.form-group.invalid select {
    border-color: var(--error-color);
    background-color: rgba(231, 76, 60, 0.05);
}

.form-group.invalid label {
    color: var(--error-color);
}

.validation-message {
    display: none;
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-group.invalid .validation-message {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    #booking-plugin {
        padding: 1rem;
    }
    
    #slots-display {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    input, select, button {
        padding: 0.5rem;
    }
}
