/* PickDatePlace — shared styles */

:root {
    --green: #34C759;
    --orange: #FF9500;
    --red: #FF3B30;
    --blue: #007AFF;
    --bg: #F2F2F7;
    --card: #FFFFFF;
    --text: #1C1C1E;
    --text-secondary: #8E8E93;
    --separator: #E5E5EA;
    --radius: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --card: #1C1C1E;
        --text: #FFFFFF;
        --text-secondary: #8E8E93;
        --separator: #38383A;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
}

/* Landing page */

.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    text-align: center;
    padding: 32px 16px;
}

.landing h1 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 20px;
}

.landing .tagline {
    font-size: 17px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.landing .description {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 360px;
    line-height: 1.5;
}

.app-store-button {
    display: inline-block;
    margin-top: 28px;
    padding: 14px 28px;
    background: var(--blue);
    color: white;
    text-decoration: none;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 600;
    transition: opacity 0.15s;
}

.app-store-button:hover {
    opacity: 0.85;
}

/* Poll page */

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.poll-header h1 {
    font-size: 22px;
    font-weight: 700;
}

.poll-header .description {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

.poll-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 10px;
}

.poll-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    padding: 16px 0 8px;
}

/* Time slot rows */

.slot {
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 2px;
}

.slot:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
}

.slot:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
    margin-bottom: 12px;
}

.slot:only-child {
    border-radius: var(--radius);
}

.slot + .slot {
    border-top: 0.5px solid var(--separator);
}

.slot-time {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}

.slot-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Availability toggle buttons */

.availability-toggles {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 10px 0;
    border: 2px solid var(--separator);
    border-radius: 10px;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text);
    text-align: center;
}

.toggle-btn:active {
    transform: scale(0.97);
}

.toggle-btn.yes {
    border-color: var(--green);
    color: var(--green);
}

.toggle-btn.yes.selected {
    background: var(--green);
    color: white;
}

.toggle-btn.maybe {
    border-color: var(--orange);
    color: var(--orange);
}

.toggle-btn.maybe.selected {
    background: var(--orange);
    color: white;
}

.toggle-btn.no {
    border-color: var(--red);
    color: var(--red);
}

.toggle-btn.no.selected {
    background: var(--red);
    color: white;
}

/* Submit */

.submit-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-top: 4px;
}

.submit-btn:hover {
    opacity: 0.85;
}

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

/* Locked banner */

.locked-banner {
    background: var(--green);
    color: white;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    text-align: center;
}

.locked-banner h2 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

.locked-banner p {
    font-size: 15px;
    opacity: 0.9;
}

/* Results badges (read-only view) */

.slot-results {
    display: flex;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
}

.badge {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 6px;
}

.badge.yes {
    background: rgba(52, 199, 89, 0.15);
    color: var(--green);
}

.badge.maybe {
    background: rgba(255, 149, 0, 0.15);
    color: var(--orange);
}

.badge.no {
    background: rgba(255, 59, 48, 0.15);
    color: var(--red);
}

/* States */

.state-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60dvh;
    text-align: center;
    padding: 32px 16px;
}

.state-view .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.state-view h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.state-view p {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 300px;
    line-height: 1.5;
}

/* Loading spinner */

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--separator);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* App icon */

.app-icon-large svg {
    display: block;
}

.app-icon-small {
    width: 32px;
    height: 32px;
    background: var(--blue);
    border-radius: 8px;
}

/* Footer */

.footer {
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.footer a {
    color: var(--blue);
    text-decoration: none;
}

