/* ============================================
   BESØGSDAG TILMELDING - Frontend CSS
   Matched to Horne Efterskole kontaktform design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Alata&display=swap');

/* Wrapper */
.bt-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Alata', sans-serif;
    color: #4a4a4a;
}

/* Container */
.bt-form-container {
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header - hidden */
.bt-form-header {
    display: none;
}

/* Form */
.bt-form {
    padding: 20px;
}

/* Form groups */
.bt-form-group {
    margin-bottom: 25px;
}

/* Labels */
.bt-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #4a4a4a;
    font-size: 16px;
}

.bt-label-icon {
    display: none;
}

.bt-required {
    color: #EC5E5D;
    font-weight: bold;
}

/* Section headings - red underline style */
.bt-form-section-heading {
    color: #007cba;
    margin: 0 0 15px 0;
    padding: 10px 0;
    border-bottom: 2px solid #EC5E5D;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Alata', sans-serif;
}

/* White card sections for grouped fields */
.bt-form-group-card {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 25px;
}

/* Inputs */
.bt-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    font-family: 'Alata', sans-serif;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #4a4a4a;
    background-color: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.bt-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.bt-input::placeholder {
    color: #999;
}

.bt-select {
    cursor: pointer;
}

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

/* Checkbox and Radio groups - grid layout */
.bt-checkbox-group,
.bt-radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.bt-checkbox-label,
.bt-radio-label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Alata', sans-serif;
    font-size: 14px;
    color: #4a4a4a;
    user-select: none;
}

.bt-checkbox-label:hover,
.bt-radio-label:hover {
    background: #f0f0f0;
    border-color: #007cba;
}

.bt-checkbox-label:has(.bt-checkbox:checked),
.bt-radio-label:has(.bt-radio:checked) {
    background: #e3f2fd;
    border-color: #007cba;
}

.bt-checkbox,
.bt-radio {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #00b064;
}

.bt-checkbox-custom,
.bt-radio-custom {
    display: none;
}

.bt-checkbox-text,
.bt-radio-text {
    flex: 1;
    font-weight: normal;
}

/* GDPR */
.bt-gdpr-group {
    margin-top: 8px;
}

.bt-gdpr-label {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 14px;
}

.bt-gdpr-label .bt-checkbox-text {
    font-size: 14px;
    color: #4a4a4a;
    line-height: 1.5;
}

/* Error messages */
.bt-field-error {
    color: #d63384;
    font-size: 14px;
    margin-top: 5px;
    padding: 8px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    display: none;
}

.bt-field-error.active {
    display: block;
}

.bt-no-dates {
    color: #e67e22;
    font-size: 14px;
    font-style: italic;
    margin-top: 8px;
}

/* Submit Button */
.bt-form-actions {
    margin-top: 25px;
}

.bt-submit-btn {
    width: 100%;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Alata', sans-serif;
    color: white;
    background: #EC5E5D;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.bt-submit-btn:hover {
    background: #d94f4e;
}

.bt-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.bt-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bt-spinner {
    animation: bt-spin 0.8s linear infinite;
}

@keyframes bt-spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.bt-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Alata', sans-serif;
}

.bt-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bt-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .bt-checkbox-group,
    .bt-radio-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .bt-form-wrapper {
        padding: 15px;
    }
    .bt-form {
        padding: 15px;
    }
}
