/* Workplan ContactForm Design System */
:root {
    --primary: #20a29d;
    --primary-hover: #1a8a85;
    --navy: #192734;
    --mint: #c6e2df;
    --page-bg: #f4f7f6;
    --card-bg: #ffffff;
    --muted: #5f7a8a;
    --border: #d1dbd9;
    --error: #dc2626;
    --success: #16a34a;
}

html, body {
    font-family: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--page-bg);
    color: var(--navy);
    -webkit-font-smoothing: antialiased;
}

/* Form input */
.cf-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    color: var(--navy);
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.cf-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(32, 162, 157, 0.15);
}

.cf-input::placeholder {
    color: #9cb3b0;
}

select.cf-input {
    cursor: pointer;
}

textarea.cf-input {
    resize: vertical;
    min-height: 100px;
}

/* Primary button */
.cf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.5;
    color: #fff;
    background-color: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.cf-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.cf-btn:active:not(:disabled) {
    transform: scale(0.98);
}

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

/* Outline button */
.cf-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.5;
    color: var(--primary);
    background-color: transparent;
    border: 2px solid var(--primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cf-btn-outline:hover {
    background-color: var(--primary);
    color: #fff;
}

/* Validation error text */
.cf-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--error);
}

/* Blazor validation integration */
.validation-message {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--error);
}

.valid.modified:not([type=checkbox]) {
    outline: none;
}

.invalid {
    outline: none;
    border-color: var(--error) !important;
}

/* Error boundary */
.blazor-error-boundary {
    background: var(--error);
    padding: 1rem;
    color: white;
    border-radius: 8px;
    margin: 1rem;
}

.blazor-error-boundary::after {
    content: "Ett fel har inträffat.";
}

h1:focus {
    outline: none;
}
