/* ==========================================================================
   UNIFIED FORM STYLESHEET (Infant Care & Tender Hands)
   ========================================================================== */

/* Root Container Styles */
.ica-form,
.tha-form {
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #2d3748;
    box-sizing: border-box;
}

.ica-form *,
.tha-form * {
    box-sizing: border-box;
}

/* Form Headers */
.ica-header,
.tha-header {
    text-align: center;
    border-bottom: 3px solid #2b6cb0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.ica-header h2,
.tha-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1a365d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Terms / Agreement Box */
.tha-terms-body {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #2b6cb0;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    max-height: 350px;
    overflow-y: auto;
}

.tha-terms-body p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px 0;
    color: #4a5568;
    text-align: justify;
}

.tha-terms-body h4 {
    font-size: 15px;
    color: #2b6cb0;
    margin: 16px 0 6px 0;
    text-transform: uppercase;
    font-weight: 700;
}

.tha-terms-body h4:first-child {
    margin-top: 0;
}

/* Fieldsets & Section Legends */
.ica-section,
.tha-section {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    background: #ffffff;
}

.ica-section legend,
.tha-section legend {
    font-size: 13px;
    font-weight: 700;
    color: #1a365d;
    padding: 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Flexbox Layout Rows & Columns */
.ica-row,
.tha-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.ica-row:last-child,
.tha-row:last-child {
    margin-bottom: 0;
}

.ica-col,
.tha-col {
    flex: 1 1 calc(50% - 10px);
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.ica-col-full {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
}

/* Input Fields & Textareas */
.ica-col label,
.tha-col label,
.ica-col-full label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.ica-col input[type="text"],
.ica-col input[type="email"],
.ica-col input[type="date"],
.ica-col input[type="password"],
.ica-col input[type="tel"],
.tha-col input[type="text"],
.tha-col input[type="email"],
.tha-col input[type="date"],
.ica-col-full textarea,
.tha-col textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background-color: #fff;
    color: #2d3748;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tha-col input[readonly] {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
    font-weight: 600;
    cursor: not-allowed;
}

.ica-col input:focus,
.tha-col input:focus,
.ica-col-full textarea:focus,
.tha-col textarea:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.ica-col-full textarea,
.tha-col textarea {
    resize: vertical;
    min-height: 70px;
}

/* Checkbox & Radio Alignment */
.ica-group {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.ica-group label {
    font-size: 13.5px;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ica-group input[type="checkbox"],
.ica-group input[type="radio"] {
    accent-color: #2b6cb0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Signature Canvas Area */
.sig-canvas {
    width: 100%;
    height: 120px;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    background-color: #f8fafc;
    cursor: crosshair;
    touch-action: none;
}

.clear-sig-btn {
    align-self: flex-start;
    margin-top: 6px;
    padding: 4px 10px;
    font-size: 12px;
    background-color: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.clear-sig-btn:hover {
    background-color: #cbd5e1;
    color: #1a202c;
}

/* Submit Action Buttons */
.ica-submit-wrapper,
.tha-submit-wrapper {
    text-align: center;
    margin-top: 30px;
}

.ica-submit-btn,
.tha-submit-btn {
    background-color: #2b6cb0;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    padding: 14px 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ica-submit-btn:hover,
.tha-submit-btn:hover {
    background-color: #2c5282;
}

.ica-submit-btn:active,
.tha-submit-btn:active {
    transform: scale(0.98);
}

/* Success Banners */
.ica-success-notice,
.tha-success-notice {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media screen and (max-width: 600px) {
    .ica-form,
    .tha-form {
        padding: 15px;
    }
    
    .ica-row,
    .tha-row {
        flex-direction: column;
        gap: 12px;
    }

    .ica-col,
    .tha-col {
        flex: 1 1 100%;
        min-width: 100%;
    }
}