/**
 * HRK — Password & Notes Field Styles
 * Upload to: wp-content/themes/YOUR-THEME/
 */

/* ── Wrapper ── */
#hrk-extra-fields {
    margin: 20px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Section Card ── */
.hrk-field-section {
    background: #FFFFFF;
    border: 1.5px solid #EEF1F6;
    border-radius: 14px;
    padding: 22px 24px;
    transition: border-color 0.25s;
}

.hrk-field-section:hover {
    border-color: rgba(28, 201, 122, 0.3);
}

/* ── Section Header ── */
.hrk-section-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.hrk-lock-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.hrk-field-title {
    font-family: 'Syne', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    color: #0D1521 !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: none !important;
}

.hrk-field-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: #7A8CA0;
    line-height: 1.5;
    margin: 0 !important;
}

/* ── Label ── */
.hrk-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #3D4F65 !important;
    margin-bottom: 8px !important;
}

/* ── Optional Badge ── */
.hrk-optional-badge {
    display: inline-block;
    background: rgba(28, 201, 122, 0.1);
    color: #1CC97A;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
}

/* ── Input Wrapper ── */
.hrk-input-wrap {
    margin-bottom: 14px;
}

.hrk-input-inner {
    position: relative;
    display: flex;
    align-items: center;
}

/* ── Input / Textarea ── */
.hrk-input {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    color: #0D1521 !important;
    background: #F5F7FA !important;
    border: 1.5px solid #EEF1F6 !important;
    border-radius: 10px !important;
    padding: 12px 44px 12px 16px !important;
    width: 100% !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    -webkit-appearance: none;
}

.hrk-textarea {
    padding: 12px 16px !important;
    resize: vertical !important;
    min-height: 100px !important;
}

.hrk-input:focus {
    border-color: #1CC97A !important;
    box-shadow: 0 0 0 3px rgba(28, 201, 122, 0.12) !important;
    background: #FFFFFF !important;
}

.hrk-input.hrk-input-error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.hrk-input.hrk-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Toggle Visibility Button ── */
.hrk-toggle-visibility {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.hrk-toggle-visibility:hover {
    opacity: 1;
}

/* ── Hint Text ── */
.hrk-input-hint {
    font-family: 'DM Sans', sans-serif;
    font-size: 11.5px;
    color: #7A8CA0;
    margin: 7px 0 0 !important;
    line-height: 1.5;
}

/* ── Alternative Option ── */
.hrk-alternative {
    background: #F5F7FA;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    border: 1px solid #EEF1F6;
}

/* ── Consent ── */
.hrk-consent-wrap {
    background: rgba(28, 201, 122, 0.04);
    border: 1px solid rgba(28, 201, 122, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
}

/* ── Checkbox ── */
.hrk-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin: 0 !important;
}

.hrk-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.hrk-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid #EEF1F6;
    border-radius: 5px;
    background: #FFFFFF;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
    position: relative;
    display: inline-block;
}

.hrk-checkbox-label input[type="checkbox"]:checked + .hrk-checkbox-custom {
    background: #1CC97A;
    border-color: #1CC97A;
}

.hrk-checkbox-label input[type="checkbox"]:checked + .hrk-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: 2px solid #0A0E14;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.hrk-checkbox-required {
    border-color: rgba(28, 201, 122, 0.4) !important;
}

.hrk-checkbox-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #3D4F65;
    line-height: 1.55;
}

.hrk-checkbox-text a {
    color: #1CC97A;
    text-decoration: none;
}

.hrk-checkbox-text a:hover {
    text-decoration: underline;
}

.hrk-required-star {
    color: #EF4444;
    margin-left: 2px;
}

/* ── Error Message ── */
.hrk-error-msg {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #DC2626;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 7px;
    padding: 8px 12px;
    margin: 8px 0 0 !important;
}

/* ── Slide Animation ── */
#hrk-extra-fields,
#hrk-password-section,
#hrk-notes-section {
    overflow: hidden;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .hrk-field-section {
        padding: 18px 16px;
    }

    .hrk-section-header {
        gap: 10px;
    }

    .hrk-field-title {
        font-size: 0.95rem !important;
    }

    .hrk-input {
        font-size: 16px !important; /* iOS zoom prevent */
    }
}
