/* Ported from original Site.css */
body {
    padding-top: 50px;
    padding-bottom: 20px;
    font-family: Arial, Helvetica, sans-serif;
}

.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}

/* styles for validation helpers */
.field-validation-error {
    color: #b94a48;
}

.field-validation-valid {
    display: none;
}

input.input-validation-error {
    border: 1px solid #b94a48;
}

input[type="checkbox"].input-validation-error {
    border: 0 none;
}

.validation-summary-errors {
    color: #b94a48;
}

.validation-summary-valid {
    display: none;
}

/* Validation styling for Blazor */
.validation-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.valid.modified:not([type=checkbox]) {
    border-color: #28a745;
}

.validation-errors {
    color: #dc3545;
    list-style: none;
    padding-left: 0;
}

.validation-errors li {
    margin-bottom: 0.5rem;
}

/* Blazor validation summary styling */
.validation-summary-errors ul,
.validation-errors ul {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.validation-summary-errors li::before {
    content: "• ";
    color: #dc3545;
    font-weight: bold;
}

/* Invalid input styling for Blazor */
.modern-input.invalid,
input.invalid,
textarea.invalid {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.modern-input.invalid:focus,
input.invalid:focus,
textarea.invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Layout and branding */
.brand-logo {
    height: 48px;
    width: auto;
}
.brand-title {
    font-weight: 700;
    font-size: 1.25rem;
}

/* Home hero */
.hero {
    padding: 3rem 1rem;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    margin-top: 1rem;
}
.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.hero .lead {
    font-size: 1.125rem;
    color: #555;
}

/* Form styles */
.signup-form .form-control {
    max-width: 480px;
}

/* Footer */
.footer { border-top: 1px solid rgba(0,0,0,0.05); }

/* Color palette inspired by amaranterorden.com (approximate) */
:root {
    --brand-primary: #267cb2;
    --brand-dark: #123b57;
    --brand-accent: #f4c542;
    --bg-soft: #f6fbff;
    --muted: #6c757d;
}

/* Hero card */
.hero {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--bg-soft), #ffffff);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(18,59,87,0.06);
    margin-top: 1rem;
}

/* Signup card */
.signup-form .card {
    min-width: 320px;
    max-width: 420px;
    border-radius: 12px;
    border: none;
}

/* Modern input */
.modern-input {
    border: 1px solid rgba(18,59,87,0.12);
    background: linear-gradient(180deg, #fff, #fbfdff);
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(39,83,122,0.04) inset;
    transition: all 180ms ease-in-out;
    outline: none;
    max-width: 100%;
    width: 100%;
}
.modern-input::placeholder { color: #98a6b3; }
.modern-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 6px 24px rgba(38,124,178,0.12), 0 0 0 4px rgba(38,124,178,0.08);
    transform: translateY(-1px);
}

/* Modern button */
.modern-btn {
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-dark));
    color: #fff;
    border: none;
    padding: 0.65rem 1.2rem;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(38,124,178,0.18);
    transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.modern-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(38,124,178,0.24);
}
.modern-btn:active {
    transform: translateY(-1px) scale(0.995);
    box-shadow: 0 6px 14px rgba(38,124,178,0.18);
}

/* Secondary variant */
.modern-btn.secondary {
    background: linear-gradient(90deg, #6c757d, #495057);
    box-shadow: 0 8px 20px rgba(73,80,87,0.12);
}

.modern-btn.ghost {
    background: transparent;
    color: var(--brand-primary);
    border: 1px solid rgba(38,124,178,0.12);
    box-shadow: none;
}

/* Form card responsiveness */
.signup-card-body { gap: 1rem; display: grid; grid-template-columns: 1fr; }
@media(min-width: 900px) { .signup-card-body { grid-template-columns: 1fr 380px; } }

/* Table container - NO SCROLLBARS */
.table-responsive-card {
    overflow: visible;
    width: 100%;
}

/* Fixed table layout to prevent overflow */
.table-responsive-card table {
    width: 100%;
    table-layout: fixed;
}

/* Narrow columns for Medlemsnr, Titel, Postnummer (~6 characters) */
.table-responsive-card .col-narrow {
    width: 80px;
    max-width: 80px;
}

/* Table cell styling - allow overflow for rounded corners */
.table-responsive-card th,
.table-responsive-card td {
    padding: 0.5rem 0.25rem;
    font-size: 0.85rem;
    overflow: visible;
    vertical-align: middle;
}

/* Input fields inside table cells */
.table-responsive-card .modern-input {
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
    min-width: 0;
    box-sizing: border-box;
}

/* Checkbox column */
.table-responsive-card td:first-child {
    width: 60px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero { padding: 2rem; }
    .hero h1 { font-size: 1.5rem; }
    .signup-form { margin-top: 1rem; }
    
    /* Smaller columns on mobile */
    .table-responsive-card .col-narrow {
        width: 60px;
        max-width: 60px;
    }
    
    .table-responsive-card th,
    .table-responsive-card td {
        padding: 0.4rem 0.2rem;
        font-size: 0.75rem;
    }
}
