/* =============================================
   Horne Camp Tilmelding - Frontend CSS
   Design matching kontakt-form-manager
   ============================================= */

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

.hct-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: 'Alata', sans-serif;
    color: #1e293b;
}

/* ---- Section headings with red underline ---- */
.hct-section-heading {
    color: #1e293b;
    margin: 0 0 15px 0;
    padding: 10px 0;
    border-bottom: 2px solid #ec5e5d;
    font-size: 18px;
    font-weight: bold;
}

/* ---- Section cards ---- */
.hct-section-card {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 25px;
}

/* ---- Form fields ---- */
.hct-field-group {
    margin-bottom: 20px;
}

.hct-field-group:last-child {
    margin-bottom: 0;
}

.hct-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #4a4a4a;
    font-size: 14px;
}

.hct-label.hct-required::after {
    content: ' *';
    color: #ec5e5d;
}

.hct-input, .hct-select, .hct-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: 'Alata', sans-serif;
    color: #1e293b;
}

.hct-select {
    cursor: pointer;
}

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

.hct-textarea {
    min-height: 80px;
    resize: vertical;
}

/* ---- Fields grid (2 columns) ---- */
.hct-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.hct-fields-grid .hct-field-group {
    margin-bottom: 0;
}

.hct-field-group.hct-full-width {
    grid-column: 1 / -1;
}

/* ---- Checkboxes & radios ---- */
.hct-checkbox-label, .hct-radio-label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 14px;
    color: #4a4a4a;
    font-weight: normal;
    gap: 8px;
}

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

.hct-checkbox-label input, .hct-radio-label input {
    width: 16px;
    height: 16px;
    accent-color: #00b064;
    margin: 0;
    flex-shrink: 0;
}

.hct-checkbox-label span, .hct-radio-label span {
    flex: 1;
    line-height: 1.4;
}

/* ---- GDPR ---- */
.hct-gdpr {
    background: #f5f9ff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #d0e4ff;
    font-size: 13px;
}

.hct-gdpr a {
    color: #007cba;
    text-decoration: underline;
}

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

.hct-submit-btn:hover {
    background: #d94e4d;
}

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

/* ---- Success message ---- */
.hct-success-message {
    text-align: center;
    padding: 40px 30px;
}

.hct-success-icon {
    width: 60px;
    height: 60px;
    background: #00b064;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 28px;
}

.hct-success-message h3 {
    color: #1e293b;
    margin: 0 0 10px;
    font-size: 20px;
}

.hct-success-message p {
    color: #4a4a4a;
    margin: 0;
}

/* ---- Error message ---- */
.hct-form-error {
    color: #d63384;
    font-size: 14px;
    margin-top: 15px;
    padding: 8px 12px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.hct-error, .hct-notice {
    text-align: center;
    padding: 20px;
    color: #4a4a4a;
    font-style: italic;
}

.hct-error {
    color: #d63384;
}

/* ---- Loading spinner ---- */
.hct-loading {
    position: relative;
    pointer-events: none;
}

.hct-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: hct-spin 0.6s linear infinite;
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hct-fields-grid {
        grid-template-columns: 1fr;
    }

    .hct-field-group.hct-full-width {
        grid-column: 1;
    }
}

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