/* Shared design system — form controls, buttons, cards. Referenced by all
   three layouts (public/admin/member). Brand color comes from CSS custom
   properties set inline per-layout from theme_colors(), so this file never
   needs to know the actual hex/hsl values. */

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    display: block;
    border-radius: 0.75rem;
    border: 1.5px solid #e2e8f0;
    background-color: #fff;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-textarea {
    resize: vertical;
    min-height: 6rem;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: #cbd5e1;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-100);
}

.form-input.has-error,
.form-select.has-error,
.form-textarea.has-error {
    border-color: #fca5a5;
}
.form-input.has-error:focus,
.form-select.has-error:focus,
.form-textarea.has-error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.form-checkbox {
    height: 1.125rem;
    width: 1.125rem;
    border-radius: 0.375rem;
    border: 1.5px solid #cbd5e1;
    color: var(--brand-600);
    transition: box-shadow 0.15s ease;
}
.form-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--brand-100);
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.375rem;
}

.form-error {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #dc2626;
}

.form-hint {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.65rem 1.5rem;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    cursor: pointer;
    border: none;
}
.btn:active {
    transform: translateY(1px);
}
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--brand-100);
}

.btn-primary {
    background-color: var(--brand-600);
    color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 10px -4px var(--brand-600-a30);
}
.btn-primary:hover {
    background-color: var(--brand-700);
}

.btn-secondary {
    background-color: #fff;
    color: #334155;
    border: 1.5px solid #e2e8f0;
}
.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* For buttons placed on dark hero/CTA backgrounds — transparent with a light border. */
.btn-outline-light {
    background-color: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-danger {
    background-color: #fff;
    color: #dc2626;
    border: 1.5px solid #fecaca;
}
.btn-danger:hover {
    background-color: #fef2f2;
}

/* Decorative texture — subtle dot grid, used behind hero/section backgrounds */
.bg-dot-grid {
    background-image: radial-gradient(currentColor 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

/* Soft blurred color blobs for organic, non-flat section backgrounds */
.decor-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

/* Cards */
.card {
    background-color: #fff;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card-hover:hover {
    box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}
