/* Montreal Tênis Clube - Visual Identity System CSS */

:root {
    /* Brand Colors */
    --color-saibro: #C05131;
    --color-saibro-hover: #A43F22;
    --color-saibro-light: rgba(192, 81, 49, 0.08);
    --color-creme: #f1f4e0;
    --color-creme-dark: #e2e6c5;
    --color-preto: #191919;
    --color-grey-light: #f8f9fa;
    --color-grey-border: #e9ecef;
    --color-grey-text: #6c757d;
    --color-success: #28a745;
    
    /* Layout & Styling Values */
    --font-primary: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --box-shadow-premium: 0 15px 35px rgba(25, 25, 25, 0.08), 0 5px 15px rgba(25, 25, 25, 0.03);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-creme);
    background-image: radial-gradient(circle at 10% 20%, rgba(226, 230, 197, 0.4) 0%, rgba(241, 244, 224, 0.6) 90%);
    color: var(--color-preto);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

/* Background decorative blobs */
.background-decor {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 81, 49, 0.06) 0%, rgba(192, 81, 49, 0) 70%);
    top: -100px;
    right: -100px;
    z-index: -1;
}

.background-decor-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(226, 230, 197, 0.3) 0%, rgba(226, 230, 197, 0) 70%);
    bottom: -150px;
    left: -150px;
    z-index: -1;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}

/* Glassmorphic Card */
.form-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-premium);
    padding: 35px 30px;
    transition: var(--transition-smooth);
}

@media (max-width: 480px) {
    .form-card {
        padding: 25px 18px;
    }
}

/* Header */
.form-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-logo {
    max-height: 50px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 5px rgba(25, 25, 25, 0.05));
    transition: var(--transition-smooth);
}

.brand-logo:hover {
    transform: scale(1.03);
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--color-preto);
    margin-bottom: 8px;
}

.brand-subtitle {
    font-size: 14px;
    color: var(--color-grey-text);
    max-width: 420px;
    line-height: 1.4;
}

/* Form Steps */
.form-step {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Inputs & Form Fields */
.input-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-preto);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-preto);
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid var(--color-grey-border);
    border-radius: var(--border-radius-md);
    outline: none;
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

input[type="text"]:focus,
input[type="tel"]:focus {
    border-color: var(--color-saibro);
    box-shadow: 0 0 0 4px var(--color-saibro-light);
    background: #ffffff;
}

.input-hint {
    font-size: 13px;
    color: var(--color-grey-text);
    margin-bottom: 10px;
    line-height: 1.3;
}

/* Autocomplete List */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid var(--color-grey-border);
    border-radius: var(--border-radius-md);
    background-color: #fff;
    z-index: 99;
    top: 105%;
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(25, 25, 25, 0.1);
    display: none;
}

.autocomplete-items div {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--color-grey-light);
    transition: var(--transition-smooth);
}

.autocomplete-items div:last-child {
    border-bottom: none;
}

.autocomplete-items div:hover,
.autocomplete-items .autocomplete-active {
    background-color: var(--color-creme);
    color: var(--color-saibro);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 24px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    outline: none;
}

.btn-primary {
    background-color: var(--color-saibro);
    color: #fff;
    box-shadow: 0 4px 12px rgba(192, 81, 49, 0.2);
}

.btn-primary:hover {
    background-color: var(--color-saibro-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(192, 81, 49, 0.3);
}

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

.btn-primary:disabled {
    background-color: #d6d6d6;
    color: #8c8c8c;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-saibro);
    color: var(--color-saibro);
}

.btn-secondary:hover {
    background-color: var(--color-saibro-light);
    color: var(--color-saibro-hover);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
}

.btn-block {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-saibro);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    transition: var(--transition-smooth);
}

.btn-link:hover {
    color: var(--color-saibro-hover);
}

/* User Welcome Banner */
.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-grey-light);
    border: 1px solid var(--color-grey-border);
    padding: 12px 18px;
    border-radius: var(--border-radius-md);
    margin-bottom: 25px;
}

.user-greeting {
    font-size: 15px;
    color: var(--color-preto);
}

/* Form Sections */
.form-section {
    border: none;
    margin-bottom: 30px;
}

.form-section legend {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-preto);
    margin-bottom: 8px;
    display: block;
    width: 100%;
    border-bottom: 1.5px solid var(--color-grey-border);
    padding-bottom: 6px;
}

.section-hint {
    font-size: 13px;
    color: var(--color-grey-text);
    margin-bottom: 16px;
}

/* Accordion Container & Items */
.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-item {
    background: #ffffff;
    border: 1.5px solid var(--color-grey-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.accordion-item.expanded {
    border-color: var(--color-saibro);
    box-shadow: 0 4px 15px rgba(192, 81, 49, 0.05);
}

.accordion-header {
    width: 100%;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
    text-align: left;
    outline: none;
    transition: var(--transition-smooth);
}

.accordion-header:hover {
    background-color: var(--color-grey-light);
}

.day-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-preto);
}

.day-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    background-color: var(--color-grey-border);
    color: var(--color-grey-text);
    transition: var(--transition-smooth);
}

.accordion-item.has-selections .day-badge {
    background-color: var(--color-saibro-light);
    color: var(--color-saibro);
}

.accordion-arrow {
    font-size: 12px;
    color: var(--color-grey-text);
    transition: transform 0.3s ease;
    font-weight: bold;
}

.accordion-item.expanded .accordion-arrow {
    transform: rotate(180deg);
    color: var(--color-saibro);
}

/* Accordion Content Panel */
.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
}

.accordion-item.expanded .accordion-panel {
    max-height: 1000px; /* High value for smooth auto transition */
}

.accordion-content {
    padding: 20px;
    border-top: 1.5px solid var(--color-grey-border);
}

/* Shift Grouping */
.shift-group {
    margin-bottom: 20px;
}

.shift-group:last-child {
    margin-bottom: 0;
}

.shift-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-grey-text);
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    border-left: 2px solid var(--color-saibro);
    padding-left: 6px;
}

/* Grid for time slots */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

@media (max-width: 400px) {
    .slots-grid {
        grid-template-columns: 1fr;
    }
}

.slot-card {
    cursor: pointer;
    position: relative;
    display: block;
}

.slot-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.slot-content {
    background: var(--color-grey-light);
    border: 1.2px solid var(--color-grey-border);
    border-radius: var(--border-radius-sm);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition-smooth);
}

.slot-card:hover .slot-content {
    border-color: var(--color-saibro);
    background-color: var(--color-saibro-light);
    color: var(--color-saibro-hover);
}

.slot-card input[type="checkbox"]:checked + .slot-content {
    background-color: var(--color-saibro);
    border-color: var(--color-saibro);
    color: #fff;
    box-shadow: 0 2px 6px rgba(192, 81, 49, 0.15);
}

.slot-time {
    font-size: 13px;
    font-weight: 700;
}

/* Local presets inside accordion */
.local-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.btn-local-preset {
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 700;
    color: var(--color-grey-text);
    background-color: var(--color-grey-light);
    border: 1.2px solid var(--color-grey-border);
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-local-preset:hover {
    color: var(--color-saibro);
    border-color: var(--color-saibro);
    background-color: var(--color-saibro-light);
}

/* Frequency slider control */
.frequency-control {
    background-color: var(--color-grey-light);
    border: 1px solid var(--color-grey-border);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--color-grey-border);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-saibro);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(192, 81, 49, 0.3);
    transition: var(--transition-smooth);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.frequency-value {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
}

.frequency-value span {
    color: var(--color-saibro);
    font-size: 18px;
    font-weight: 800;
}

.frequency-disclaimer {
    font-size: 12px;
    color: var(--color-grey-text);
    line-height: 1.45;
    background: #fff;
    border: 1px solid var(--color-grey-border);
    border-radius: var(--border-radius-sm);
    padding: 12px;
}

/* Error State */
.error-text {
    font-size: 13px;
    font-weight: 600;
    color: #d9534f;
    margin-top: 15px;
    text-align: center;
    background-color: #fdf3f2;
    border: 1px solid #f5c6cb;
    border-radius: var(--border-radius-md);
    padding: 10px;
    line-height: 1.4;
}

/* Footer */
.footer-branding {
    text-align: center;
    font-size: 11px;
    color: var(--color-grey-text);
    margin-top: 10px;
    opacity: 0.8;
}

/* Success Step checkmark animation */
.success-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    border: 4px solid var(--color-success);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkmark {
    width: 40px;
    height: 20px;
    transform: rotate(-45deg);
    position: absolute;
    top: 24px;
    left: 20px;
}

.checkmark.draw::after {
    animation-delay: 100ms;
    animation-duration: 500ms;
    animation-timing-function: ease;
    animation-name: checkmark;
    transform-origin: left top;
    content: "";
    position: absolute;
    width: 20px;
    height: 40px;
    border-right: 4px solid var(--color-success);
    border-bottom: 4px solid var(--color-success);
}

@keyframes checkmark {
    0% {
        height: 0;
        width: 0;
        opacity: 0;
    }
    40% {
        height: 0;
        width: 20px;
        opacity: 1;
    }
    100% {
        height: 40px;
        width: 20px;
        opacity: 1;
    }
}

#step-success h2 {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    color: var(--color-preto);
}

#step-success p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-grey-text);
    text-align: center;
    margin-bottom: 30px;
}
