/* =========================================
   Kita Dynamic Form – Frontend Styles
   Matches Klax Kita design language
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

/* ---- Wrapper ---- */
.kita-form-wrapper {
    font-family: 'Open Sans', sans-serif;
    font-size: 17px;
    color: #333;
    letter-spacing: 0.2px;
    line-height: 1.6;
    background-color: #ededed;
    border-radius: 25px;
    padding: 30px;
    max-width: 770px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* ---- Header ---- */
.kita-form-header {
    margin-bottom: 28px;
    border-bottom: 2px solid rgba(74,144,164,0.2);
    padding-bottom: 20px;
}
.kita-form-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: #333;
}
.kita-form-subtitle {
    margin: 0;
    color: #666;
    font-size: 15px;
}

/* ---- Sections ---- */
.kita-form-section {
    margin-bottom: 30px;
    background: rgba(255,255,255,0.5);
    border-radius: 16px;
    padding: 22px 24px;
}
.kita-consent-section {
    background: rgba(74,144,164,0.06);
    border: 1px solid rgba(74,144,164,0.2);
}
.kita-section-title {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 700;
    color: #4a90a4;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- Grid ---- */
.kita-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.kita-form-group {
    box-sizing: border-box;
}
.kita-col-12 { width: 100%; }
.kita-col-8  { width: calc(66.66% - 7px); }
.kita-col-6  { width: calc(50% - 7px); }
.kita-col-4  { width: calc(33.33% - 9.33px); }

@media (max-width: 600px) {
    .kita-col-8,
    .kita-col-6,
    .kita-col-4 {
        width: 100%;
    }
}

/* ---- Labels ---- */
.kita-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}
.kita-label.kita-required::after {
    content: ' *';
    color: #c0392b;
}

/* ---- Input Fields ---- */
.kita-field {
    width: 100%;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    color: #333;
    background: #fff;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.kita-field:focus {
    border-color: #4a90a4;
    box-shadow: 0 0 0 3px rgba(74,144,164,0.18);
}
.kita-field.kita-error {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.15);
}
.kita-field::placeholder {
    color: #aaa;
    font-size: 15px;
}
.kita-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ---- Select ---- */
.kita-select-wrapper {
    position: relative;
}
.kita-select-arrow {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
    font-size: 14px;
}
.kita-select {
    padding-right: 36px;
    cursor: pointer;
}

/* ---- Field hint ---- */
.kita-field-hint {
    font-size: 12px;
    color: #777;
    margin: 5px 0 0;
    line-height: 1.4;
}

/* ---- Checkboxes ---- */
.kita-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    font-weight: 400;
}
.kita-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.kita-checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 2px;
}
.kita-checkbox:checked + .kita-checkbox-custom {
    background: #4a90a4;
    border-color: #4a90a4;
}
.kita-checkbox:checked + .kita-checkbox-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
    display: block;
}
.kita-checkbox-text {
    color: #444;
}
.kita-link {
    color: #4a90a4;
    text-decoration: underline;
}

/* ---- Submit Button ---- */
.kita-form-submit {
    margin-top: 20px;
    text-align: center;
}
.kita-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #4a90a4;
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    padding: 14px 40px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(74,144,164,0.35);
    min-width: 220px;
}
.kita-submit-btn:hover {
    background: #357a8a;
    box-shadow: 0 6px 18px rgba(74,144,164,0.45);
}
.kita-submit-btn:active {
    transform: scale(0.98);
}
.kita-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ---- Spinner animation ---- */
.kita-spinner {
    animation: kita-spin 0.8s linear infinite;
}
@keyframes kita-spin {
    to { transform: rotate(360deg); }
}

/* ---- Messages ---- */
.kita-form-messages {
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
}
.kita-form-messages.kita-success {
    background: #e8f5e9;
    border: 1.5px solid #66bb6a;
    color: #2e7d32;
}
.kita-form-messages.kita-error {
    background: #fdecea;
    border: 1.5px solid #ef9a9a;
    color: #c62828;
}

/* ---- Success overlay ---- */
.kita-form-success-overlay {
    text-align: center;
    padding: 40px 20px;
}
.kita-form-success-overlay .kita-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}
.kita-form-success-overlay h3 {
    font-size: 22px;
    color: #2e7d32;
    margin-bottom: 10px;
}
.kita-form-success-overlay p {
    color: #555;
    font-size: 16px;
    max-width: 460px;
    margin: 0 auto;
}
