/* ==============================================
   TASH BOOKING FORM STYLES
   ============================================== */

/* CSS Variables for easy customization */
:root {
    --tcb-primary: #A47764;
    --tcb-secondary: #8B9D77;
    --tcb-dark: #5C3D33;
    --tcb-light: #FAF6F2;
    --tcb-text: #525252;
    --tcb-border: rgba(164, 119, 100, 0.2);
    --tcb-error: #d93025;
    --tcb-success: #34a853;
    --tcb-radius: 12px;
    --tcb-shadow: 0 10px 40px rgba(92, 61, 51, 0.08);
}

/* Container */
.tcb-form-container {
    max-width: 720px;
    margin: 80px auto;
    padding: 40px;
    background: var(--tcb-light);
    border-radius: var(--tcb-radius);
    box-shadow: var(--tcb-shadow);
    position: relative;
}

/* Progress Bar */
.tcb-progress-wrapper {
    margin-bottom: 50px;
}

.tcb-progress-bar {
    height: 4px;
    background: var(--tcb-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 30px;
}

.tcb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tcb-primary), var(--tcb-secondary));
    border-radius: 2px;
    width: 25%;
    transition: width 0.5s ease;
}

/* Progress Steps */
.tcb-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.tcb-step {
    text-align: center;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.tcb-step.active,
.tcb-step.completed {
    opacity: 1;
}

.tcb-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid var(--tcb-border);
    border-radius: 50%;
    font-weight: 600;
    color: var(--tcb-text);
    margin-bottom: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.tcb-step.active .tcb-step-number {
    background: var(--tcb-primary);
    border-color: var(--tcb-primary);
    color: white;
}

.tcb-step.completed .tcb-step-number {
    background: var(--tcb-success);
    border-color: var(--tcb-success);
    color: white;
}

.tcb-step.completed .tcb-step-number {
    font-size: 0;
}

.tcb-step.completed .tcb-step-number::after {
    content: '✓';
    position: absolute;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tcb-step-label {
    display: block;
    font-size: 13px;
    color: var(--tcb-text);
}

/* Form Header */
.tcb-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.tcb-form-title {
    font-family: 'Fraunces', serif;
    font-size: 32px;
    color: var(--tcb-dark);
    margin-bottom: 12px;
}

.tcb-form-subtitle {
    font-size: 16px;
    color: var(--tcb-text);
    line-height: 1.6;
}

/* Form Steps */
.tcb-form-step {
    display: none;
}

.tcb-form-step.active {
    display: block;
}

/* Field Wrapper */
.tcb-field-wrapper {
    margin-bottom: 24px;
}

/* Labels */
.tcb-label {
    display: block;
    font-weight: 500;
    color: var(--tcb-dark);
    margin-bottom: 8px;
    font-size: 15px;
}

.tcb-required {
    color: var(--tcb-error);
    margin-left: 4px;
}

.tcb-optional {
    color: var(--tcb-text);
    opacity: 0.7;
    font-weight: 400;
    font-size: 13px;
    margin-left: 8px;
}

/* Input Fields */
.tcb-input,
.tcb-select,
.tcb-textarea {
    width: 100%;
    padding: 14px 16px;
    background: white;
    border: 1px solid var(--tcb-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--tcb-text);
    transition: all 0.3s ease;
}

.tcb-input:focus,
.tcb-select:focus,
.tcb-textarea:focus {
    outline: none;
    border-color: var(--tcb-primary);
    box-shadow: 0 0 0 3px rgba(164, 119, 100, 0.1);
}

.tcb-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Checkbox Group */
.tcb-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin-top: 12px;
}

/* Custom scrollbar for services list */
.tcb-checkbox-group::-webkit-scrollbar {
    width: 8px;
}

.tcb-checkbox-group::-webkit-scrollbar-track {
    background: var(--tcb-border);
    border-radius: 4px;
}

.tcb-checkbox-group::-webkit-scrollbar-thumb {
    background: var(--tcb-primary);
    border-radius: 4px;
}

.tcb-checkbox-group::-webkit-scrollbar-thumb:hover {
    background: var(--tcb-dark);
}

.tcb-checkbox-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 10px 12px;
    border: 1px solid var(--tcb-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-height: 44px;
}

.tcb-checkbox-item:hover {
    border-color: var(--tcb-primary);
    background: rgba(164, 119, 100, 0.02);
}

.tcb-checkbox-item input[type="checkbox"] {
    display: none;
}

.tcb-checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--tcb-border);
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.tcb-checkbox-item input[type="checkbox"]:checked ~ .tcb-checkbox-box {
    background: var(--tcb-primary);
    border-color: var(--tcb-primary);
}

.tcb-checkbox-item input[type="checkbox"]:checked ~ .tcb-checkbox-box::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

/* Radio Group */
.tcb-radio-group {
    display: grid;
    gap: 12px;
}

.tcb-radio-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 16px;
    border: 1px solid var(--tcb-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tcb-radio-item:hover {
    border-color: var(--tcb-primary);
    background: rgba(164, 119, 100, 0.02);
}

.tcb-radio-item input[type="radio"] {
    display: none;
}

.tcb-radio-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--tcb-border);
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.tcb-radio-item input[type="radio"]:checked ~ .tcb-radio-box {
    border-color: var(--tcb-primary);
}

.tcb-radio-item input[type="radio"]:checked ~ .tcb-radio-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--tcb-primary);
    border-radius: 50%;
}

/* Consent Checkbox */
.tcb-field-checkbox .tcb-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.tcb-field-checkbox input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.tcb-checkbox-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--tcb-text);
}

/* Error States */
.tcb-field-wrapper.has-error .tcb-input,
.tcb-field-wrapper.has-error .tcb-select,
.tcb-field-wrapper.has-error .tcb-textarea {
    border-color: var(--tcb-error);
}

.tcb-error-message {
    display: block;
    color: var(--tcb-error);
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
}

/* Navigation */
.tcb-form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--tcb-border);
}

.tcb-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;    /* AÑADIDO */
    height: auto;        /* AÑADIDO */
}

.tcb-btn-prev {
    background: transparent;
    color: var(--tcb-text);
    border: 1px solid var(--tcb-border);
}

.tcb-btn-prev:hover {
    background: white;
    border-color: var(--tcb-primary);
}

.tcb-btn-next,
.tcb-btn-submit {
    background: var(--tcb-primary);
    color: white;
    margin-left: auto;
     max-width: 160px;    /* AÑADIDO */
    white-space: nowrap; /* AÑADIDO */
}

.tcb-btn-next:hover,
.tcb-btn-submit:hover {
    background: var(--tcb-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(164, 119, 100, 0.2);
}

.tcb-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Message */
.tcb-success-message {
    text-align: center;
    padding: 40px;
}

.tcb-success-icon {
    width: 80px;
    height: 80px;
    background: var(--tcb-success);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 24px;
}

.tcb-success-message h3 {
    font-family: 'Fraunces', serif;
    font-size: 24px;
    color: var(--tcb-dark);
    margin-bottom: 12px;
}

.tcb-success-message p {
    color: var(--tcb-text);
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Error Notification */
.tcb-error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--tcb-error);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(217, 48, 37, 0.2);
    z-index: 9999;
    max-width: 400px;
}

/* Emergency Support */
.tcb-emergency-support {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--tcb-border);
}

.tcb-emergency-support p {
    font-size: 13px;
    color: var(--tcb-text);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tcb-form-container {
        margin: 40px 20px;
        padding: 30px 20px;
    }
    
    .tcb-checkbox-group {
        grid-template-columns: 1fr;
        max-height: 300px;
    }
    
    .tcb-form-title {
        font-size: 26px;
    }
    
    .tcb-progress-steps {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .tcb-step-label {
        font-size: 12px;
    }
    
    .tcb-form-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .tcb-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tcb-form-container {
        margin: 20px 10px;
        padding: 20px 15px;
    }

    .tcb-progress-steps {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
    }

    .tcb-step {
        min-width: 60px;
        flex-shrink: 0;
    }

    .tcb-step-label {
        font-size: 10px;
        white-space: nowrap;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.tcb-loading {
    animation: pulse 1.5s infinite;
}

/* Accessibility */
.tcb-form-container:focus-within {
    box-shadow: 0 0 0 2px var(--tcb-primary), var(--tcb-shadow);
}

/* Skip link for screen readers */
.tcb-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;
}