/**
 * Turocraft Public Pages (Landing, Registration, etc.)
 */

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #f9fafb;
    color: #1f2937;
    line-height: 1.6;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.public-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}

.public-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}
.logo:hover { text-decoration: none; }

.public-header nav {
    display: flex;
    gap: 2rem;
}

.public-header nav a {
    color: #4b5563;
    font-weight: 500;
}

.public-header nav a:hover {
    color: #2563eb;
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}
.btn-primary:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

/* Flash Messages */
.flash {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* Registration Page */
.register-page {
    padding: 3rem 0;
}

.register-page .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.register-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.register-header {
    text-align: center;
    margin-bottom: 2rem;
}

.register-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.register-header p {
    color: #6b7280;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-section h2 {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

/* Input with addon */
.input-with-addon {
    display: flex;
}

.input-with-addon input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-with-addon .addon {
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #6b7280;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.slug-status {
    display: block;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    min-height: 1.25rem;
}

.slug-status.checking { color: #6b7280; }
.slug-status.available { color: #059669; }
.slug-status.error { color: #dc2626; }

/* Branch Select */
.branch-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.branch-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.625rem 0.375rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    background: #fff;
}

.branch-option:hover {
    border-color: #2563eb;
}

.branch-option:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}

.branch-option input {
    position: absolute;
    opacity: 0;
}

.branch-icon {
    font-size: 1.25rem;
    margin-bottom: 0.125rem;
}

.branch-name {
    font-size: 0.6875rem;
    color: #374151;
    line-height: 1.2;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
    margin-top: 0.25rem;
}

.checkbox-label span {
    font-size: 0.9375rem;
    color: #4b5563;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #6b7280;
}

/* Benefits */
.register-benefits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 2rem;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #374151;
}

.benefit svg {
    color: #059669;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .register-page .container {
        grid-template-columns: 1fr;
    }
    
    .register-benefits {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding-top: 0;
    }
    
    .benefit {
        flex: 0 0 auto;
    }
}

@media (max-width: 600px) {
    .branch-select {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .register-card {
        padding: 1.5rem;
    }
    
    .public-header nav {
        display: none;
    }
}
