/* 
 * SEO Lausitz Terminmanager - Public Stylesheet
 * Responsive, Modern, Accessible and Mobile-First
 */

:root {
    --sltm-primary: #0073aa;
    --sltm-primary-hover: #005177;
    --sltm-primary-light: #f0f8ff;
    --sltm-bg-card: #ffffff;
    --sltm-text-dark: #2c3338;
    --sltm-text-muted: #646970;
    --sltm-border: #dcdcde;
    --sltm-border-focus: #3582c4;
    --sltm-success: #00a32a;
    --sltm-success-bg: #f0f9f1;
    --sltm-error: #d63638;
    --sltm-error-bg: #fcf0f1;
    --sltm-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --sltm-radius: 8px;
    --sltm-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sltm-booking {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--sltm-text-dark);
    max-width: 650px;
    margin: 20px auto;
    background: var(--sltm-bg-card);
    padding: 30px;
    border-radius: var(--sltm-radius);
    box-shadow: var(--sltm-shadow);
    border: 1px solid var(--sltm-border);
    box-sizing: border-box;
}

.sltm-unified-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sltm-form-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sltm-form-section h3 {
    margin: 0 0 5px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sltm-primary);
    border-bottom: 2px solid var(--sltm-primary-light);
    padding-bottom: 8px;
}

.sltm-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sltm-form-field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sltm-text-dark);
}

.sltm-form-field input[type="text"],
.sltm-form-field input[type="email"],
.sltm-form-field input[type="url"],
.sltm-form-field input[type="date"],
.sltm-form-field select,
.sltm-form-field textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 14px;
    border: 1.5px solid var(--sltm-border);
    border-radius: var(--sltm-radius);
    background-color: #fafafa;
    color: var(--sltm-text-dark);
    transition: var(--sltm-transition);
    box-sizing: border-box;
    width: 100%;
}

.sltm-form-field input:focus,
.sltm-form-field select:focus,
.sltm-form-field textarea:focus {
    outline: none;
    border-color: var(--sltm-border-focus);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(53, 130, 196, 0.15);
}

.sltm-form-field input:disabled,
.sltm-form-field select:disabled {
    background-color: #f0f0f1;
    color: #a7aaad;
    cursor: not-allowed;
    border-color: #dbdecb;
}

/* Time Slot Grid - Highly Responsive (only active when slots are loaded) */
#sltm-time-slots.sltm-slots-loaded {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.sltm-time-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    border: 2px solid var(--sltm-primary);
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--sltm-primary);
    background: #fff;
    cursor: pointer;
    transition: var(--sltm-transition);
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sltm-time-slot:hover,
.sltm-time-slot:focus {
    background: var(--sltm-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.15);
    outline: none;
}

.sltm-time-slot:active {
    transform: translateY(1px);
}

.sltm-time-slot.sltm-selected {
    background: var(--sltm-primary);
    color: #fff;
    border-color: var(--sltm-primary);
    box-shadow: 0 4px 10px rgba(0, 115, 170, 0.3);
}

.sltm-time-slot.sltm-disabled {
    background: #f4f4f6;
    color: var(--sltm-text-muted);
    border-color: var(--sltm-border);
    text-decoration: line-through;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    opacity: 0.65;
}

/* Submit Button */
.sltm-btn {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: var(--sltm-primary);
    border: none;
    padding: 14px 24px;
    border-radius: var(--sltm-radius);
    cursor: pointer;
    transition: var(--sltm-transition);
    box-shadow: 0 4px 6px rgba(0, 115, 170, 0.2);
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.sltm-btn:hover:not(:disabled),
.sltm-btn:focus:not(:disabled) {
    background: var(--sltm-primary-hover);
    box-shadow: 0 6px 12px rgba(0, 115, 170, 0.3);
    outline: none;
    transform: translateY(-1px);
}

.sltm-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.sltm-btn:disabled {
    background-color: #dcdcde;
    color: #a7aaad;
    cursor: not-allowed;
    box-shadow: none;
}

/* Address Fields Wrapper */
#sltm-address-container {
    animation: slideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Error/Success Messages */
.sltm-error-msg {
    color: var(--sltm-error);
    background: var(--sltm-error-bg);
    padding: 12px 16px;
    border-left: 4px solid var(--sltm-error);
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 15px 0;
}

.sltm-success-msg {
    color: var(--sltm-success);
    background: var(--sltm-success-bg);
    padding: 15px 20px;
    border-left: 4px solid var(--sltm-success);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

.sltm-loading-spinner {
    text-align: center;
    padding: 30px;
    font-weight: bold;
    color: var(--sltm-text-muted);
}

/* Mobile Responsive Adjustments */
@media (max-width: 600px) {
    .sltm-booking {
        margin: 10px;
        padding: 20px 15px;
        border-radius: 6px;
    }

    .sltm-booking h3 {font-size: calc(var(--base-font-size) + 0.2rem) !important;}
    
    .sltm-unified-form {
        gap: 20px;
    }
    
    .sltm-form-section h3 {
        font-size: 1.15rem;
    }
    
    .sltm-form-field input[type="text"],
    .sltm-form-field input[type="email"],
    .sltm-form-field input[type="url"],
    .sltm-form-field input[type="date"],
    .sltm-form-field select {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    #sltm-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 8px;
    }
    
    .sltm-time-slot {
        font-size: 0.9rem;
        padding: 10px 8px;
    }
    
    .sltm-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    #sltm-address-container > div {
        flex-direction: column;
        gap: 15px !important;
    }
}
