@tailwind base;
@tailwind components;
@tailwind utilities;

/* Uniforme Formulier Styling - Gelijk aan admin modal bewerk modal */
/* Deze styling wordt gebruikt in zowel ouders als vrijwilligers portalen */

/* Form Labels */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.25;
}

/* Form Inputs, Textareas en Selects */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: all 0.2s ease;
    background: white;
    color: #111827;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #23cad6;
    box-shadow: 0 0 0 3px rgba(35, 202, 214, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

/* Select dropdowns - custom arrow */
.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    height: auto;
    min-height: 2.5rem;
}

/* Checkbox & Radio Button Styling - Uniform met admin modal */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid #d1d5db;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"] {
    border-radius: 0.25rem;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: #23cad6;
    box-shadow: 0 0 0 3px rgba(35, 202, 214, 0.1);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: #23cad6;
    border-color: #23cad6;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(35, 202, 214, 0.2);
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Disabled Form Inputs - Grijs gevuld, zelfde styling als andere velden */
.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 1;
}

.form-input:disabled:focus,
.form-textarea:disabled:focus,
.form-select:disabled:focus {
    border-color: #d1d5db;
    box-shadow: none;
}

/* Form States */
.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #ea5560;
    box-shadow: 0 0 0 3px rgba(234, 85, 96, 0.1);
}

.form-input.success,
.form-textarea.success,
.form-select.success {
    border-color: #91d02d;
    box-shadow: 0 0 0 3px rgba(145, 208, 45, 0.1);
}

