/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #A31A1A;
    background: #FFFFFF;
    min-height: 100vh;
}

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

/* Header Styles */
header {
    text-align: left;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #B8A40B;
    margin-bottom: 8px;
    text-align: left;
}

header p {
    font-size: 1.1rem;
    color: #A31A1A;
    font-weight: 300;
    text-align: justify;
}

/* Main Content */
main {
    max-width: 800px;
    margin: 0 auto;
}

main > section:first-of-type {
    text-align: left;
    margin-bottom: 30px;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #A31A1A;
}

main > section:first-of-type h2 {
    font-size: 2rem;
    color: #B8A40B;
    margin-bottom: 12px;
    font-weight: 600;
    text-align: left;
}

main > section:first-of-type p {
    font-size: 1.1rem;
    color: #A31A1A;
    font-weight: 300;
    text-align: justify;
}

/* Form Card */
.form-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    border: 1px solid #A31A1A;
    text-align: justify;
}

.form-card h3 {
    font-size: 1.5rem;
    color: #B8A40B;
    margin-bottom: 24px;
    font-weight: 600;
    text-align: left;
}

.form-card legend {
    font-size: 1.2rem;
    color: #B8A40B;
    margin: 24px 0 16px 0;
    font-weight: 500;
    padding-bottom: 8px;
    border-bottom: 2px solid #A31A1A;
    text-align: left;
}

/* Form Elements */
.form-card > div,
.form-card > fieldset > div {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row > div {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #A31A1A;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #A31A1A;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #FFFFFF;
    color: #A31A1A;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #B8A40B;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Custom Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: #A31A1A;
    padding: 12px 16px;
    border: 2px solid #A31A1A;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: left;
}

.radio-group label:hover {
    border-color: #B8A40B;
}

.radio-group input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    accent-color: #B8A40B;
}

.radio-group label:has(input[type="radio"]:checked) {
    border-color: #B8A40B;
    background: #FFFFFF;
}

/* Custom Checkbox */
input[type="checkbox"] + label,
label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #A31A1A;
    margin-top: 8px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #B8A40B;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: #B8A40B;
    color: #FFFFFF;
    border: 1px solid #B8A40B;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #FFFFFF;
    color: #B8A40B;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Utility Classes */
.hidden {
    display: none;
}

.info-display {
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    padding: 8px 16px;
    border-radius: 6px;
    margin-top: 8px;
    border: 1px solid #A31A1A;
    color: #A31A1A;
}

/* Sections */
.section {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #A31A1A;
}

.section legend {
    font-weight: 600;
    padding: 0 10px;
    color: #B8A40B;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-weight: 500;
    background: #FFFFFF;
    border: 1px solid #A31A1A;
    color: #A31A1A;
    text-align: justify;
}

.message.success {
    border-color: #B8A40B;
    color: #B8A40B;
}

.message.error {
    border-color: #A31A1A;
    color: #A31A1A;
}

.message.warning {
    border-color: #B8A40B;
    color: #A31A1A;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #A31A1A;
    font-size: 0.9rem;
}

/* File Upload Styling */
input[type="file"] {
    padding: 8px;
    border: 2px dashed #A31A1A;
    background: #FFFFFF;
    color: #A31A1A;
}

small {
    color: #A31A1A;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main > section:first-of-type {
        padding: 20px;
    }
    
    main > section:first-of-type h2 {
        font-size: 1.5rem;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row > div {
        margin-bottom: 20px;
    }
    
    .radio-group {
        gap: 8px;
    }
    
    .radio-group label {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        padding: 12px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .form-card {
        padding: 16px;
    }
}

/* Loading and Animation States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus indicators for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #B8A40B;
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Remove custom styling conflicts */
fieldset {
    border: none;
}

/* Voice Recording Styles */
#recording-controls {
    margin: 16px 0;
}

#recording-timer {
    font-size: 2rem;
    font-weight: 600;
    color: #A31A1A;
    text-align: center;
    margin: 16px 0;
    font-variant-numeric: tabular-nums;
}

.recording-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.record-icon {
    display: inline-block;
    color: #B8A40B;
    font-size: 1.5rem;
    line-height: 1;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#startRecording .record-icon {
    animation: none;
}

#recording-active .record-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

#audioPlayback {
    width: 100%;
    max-width: 500px;
    margin: 16px auto;
    display: block;
}

/* Alignments for the booking form page elements */
.form-card small {
    display: block;
    text-align: justify;
}

.terms-checkbox p {
    text-align: justify;
}

.payment-summary p {
    text-align: left;
}

input, select, textarea, .btn, option {
    text-align: left;
}