/* SimpleSchedule — minimal design */

/* ========== Reset & Base ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    background: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== Layout ========== */
.page {
    flex: 1;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page--narrow {
    max-width: 480px;
}

.page--medium {
    max-width: 860px;
}

/* ========== Typography ========== */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0a0a0a;
}

h1 { font-size: 2.75rem; line-height: 1.15; }
h2 { font-size: 1.5rem; line-height: 1.3; }
h3 { font-size: 1.125rem; line-height: 1.4; }

p {
    color: #525252;
    font-size: 1.0625rem;
    line-height: 1.7;
}

small, .text-sm {
    font-size: 0.875rem;
    color: #737373;
}

a {
    color: #0a0a0a;
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: #525252;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
    font-family: inherit;
}

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

.btn--primary {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
}

.btn--primary:hover:not(:disabled) {
    background: #262626;
    border-color: #262626;
}

.btn--secondary {
    background: #ffffff;
    color: #525252;
    border-color: #e5e5e5;
}

.btn--secondary:hover:not(:disabled) {
    background: #fafafa;
    border-color: #d4d4d4;
    color: #1a1a1a;
}

.btn--danger {
    background: #ffffff;
    color: #dc2626;
    border-color: #fecaca;
}

.btn--danger:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #dc2626;
}

.btn--sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn--lg {
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
}

.btn--full {
    width: 100%;
}

/* ========== Forms ========== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #1a1a1a;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.4;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

.form-input::placeholder {
    color: #a3a3a3;
}

.form-hint {
    font-size: 0.8125rem;
    color: #737373;
    margin-top: 0.25rem;
}

/* ========== Cards / Sections ========== */
.card {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2,
.card-header h3 {
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* ========== Navbar ========== */
.topbar {
    border-bottom: 1px solid #f0f0f0;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
    width: 100%;
}

.topbar-brand {
    font-weight: 600;
    font-size: 1rem;
    color: #0a0a0a;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-right .text-sm {
    color: #737373;
}

/* ========== Hero (Landingpage) ========== */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
}

.hero h1 {
    margin-bottom: 1.25rem;
}

.hero p {
    font-size: 1.25rem;
    color: #737373;
    max-width: 540px;
    margin: 0 auto 2.5rem;
}

/* ========== Features Grid ========== */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 3rem 0 5rem;
    border-top: 1px solid #f0f0f0;
}

.feature {
    padding: 0.5rem 0;
}

.feature h3 {
    margin-bottom: 0.5rem;
}

.feature p {
    font-size: 0.9375rem;
    color: #737373;
}

/* ========== Slot Grid (Booking) ========== */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.slot-btn {
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid #e5e5e5;
    background: #ffffff;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
    color: #1a1a1a;
    text-align: center;
}

.slot-btn:hover {
    border-color: #0a0a0a;
    background: #fafafa;
}

.slot-btn.selected {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
}

.day-section {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    background: #fafafa;
}

.day-header {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

/* ========== Booking Layout ========== */
.booking-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    padding: 3rem 0;
    align-items: start;
}

.booking-sidebar {
    position: sticky;
    top: 2rem;
}

/* ========== Period Selector ========== */
.period-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.period-btn {
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
    font-family: inherit;
    border: 1px solid #e5e5e5;
    background: #ffffff;
    color: #525252;
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.15s;
}

.period-btn:hover {
    border-color: #d4d4d4;
    color: #1a1a1a;
}

.period-btn.active {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
}

/* ========== Alerts / Messages ========== */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    margin-top: 1rem;
}

.alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert--info {
    background: #f9fafb;
    color: #525252;
    border: 1px solid #e5e5e5;
}

/* ========== Badge ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid;
}

.badge--success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.badge--danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.badge--neutral {
    color: #525252;
    background: #f9fafb;
    border-color: #e5e5e5;
}

/* ========== Tables ========== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.table th {
    text-align: left;
    font-weight: 500;
    color: #737373;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    color: #1a1a1a;
    vertical-align: top;
}

.table tr:last-child td {
    border-bottom: none;
}

/* ========== Loading ========== */
.loading {
    text-align: center;
    padding: 3rem;
    color: #737373;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e5e5;
    border-top-color: #0a0a0a;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto 0.75rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Footer ========== */
.site-footer {
    border-top: 1px solid #f0f0f0;
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: auto;
}

.site-footer a {
    color: #a3a3a3;
    font-size: 0.8125rem;
    margin: 0 0.75rem;
    transition: color 0.15s;
}

.site-footer a:hover {
    color: #525252;
}

/* ========== Docs ========== */
.docs h1 {
    font-size: 2rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
    margin-bottom: 2.5rem;
}

.docs h2 {
    margin-top: 3rem;
    margin-bottom: 0.75rem;
}

.docs h3 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.docs p,
.docs li {
    color: #525252;
    line-height: 1.8;
}

.docs ul,
.docs ol {
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}

.docs li {
    margin-bottom: 0.3rem;
}

.toc {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    background: #fafafa;
    padding: 1.25rem 1.75rem;
    margin-bottom: 2.5rem;
}

.toc strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #737373;
}

.toc a {
    color: #525252;
    display: block;
    padding: 0.2rem 0;
    font-size: 0.9375rem;
}

.toc a:hover {
    color: #0a0a0a;
}

.toc .toc-sub {
    padding-left: 1.25rem;
    font-size: 0.875rem;
}

.hint {
    border: 1px solid #f0f0f0;
    border-left: 3px solid #d4d4d4;
    border-radius: 0 8px 8px 0;
    background: #fafafa;
    padding: 0.875rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    color: #525252;
}

.url-example {
    background: #f5f5f5;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    display: inline-block;
    margin: 0.5rem 0;
    color: #1a1a1a;
}

.docs table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9375rem;
}

.docs th {
    text-align: left;
    font-weight: 500;
    color: #737373;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #e5e5e5;
}

.docs td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #f5f5f5;
    color: #525252;
    vertical-align: top;
}

.section-divider {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: 3rem 0;
}

/* ========== Time Range Group ========== */
.time-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-range .form-input {
    width: auto;
    flex: 1;
}

.time-range-sep {
    color: #737373;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ========== Availability List ========== */
.avail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.avail-item:last-child {
    border-bottom: none;
}

/* ========== Section Spacing ========== */
.section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

/* ========== Inline KV ========== */
.kv-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.9375rem;
}

.kv-row:last-child {
    border-bottom: none;
}

.kv-label {
    color: #737373;
    font-weight: 500;
}

.kv-value {
    color: #1a1a1a;
}

/* ========== Provider / Integration ========== */
.provider-block {
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.provider-block:last-child {
    border-bottom: none;
}

/* ========== Modal ========== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #737373;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: #1a1a1a;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ========== Legal Pages ========== */
.legal h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

.legal-section {
    margin-bottom: 1.5rem;
}

.legal-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.legal-value {
    color: #525252;
    line-height: 1.7;
}

/* ========== Badges ========== */
.badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    line-height: 1.4;
}

.badge--neutral {
    background: #f5f5f5;
    color: #525252;
    border: 1px solid #e5e5e5;
}

.badge--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge--danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ========== Tables ========== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.table th {
    text-align: left;
    font-weight: 500;
    color: #737373;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #e5e5e5;
}

.table td {
    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid #f5f5f5;
    color: #1a1a1a;
    vertical-align: top;
}

.table tbody tr:hover {
    background: #fafafa;
}

/* ========== Utilities ========== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: #737373; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    
    .hero { padding: 4rem 0 3rem; }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .booking-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .booking-sidebar {
        position: static;
    }
}
