/* ============================================================
   dang-ky-dich-vu.css — TamNguyenCare v3
   Sử dụng var(--custom-color) và var(--custom-color-hover)
   ============================================================ */

/* Global box-sizing */
.tn-dangky-section *,
.tn-dangky-section *::before,
.tn-dangky-section *::after {
    box-sizing: border-box;
}

/* === SECTION === */
.tn-dangky-section {
    background: #f7f9fb;
    padding: 56px 0 64px;
    position: relative;
    overflow-x: hidden;
}

/* === WRAPPER === */
.tn-dangky-wrapper {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* === HEADER === */
.tn-dangky-header {
    text-align: center;
    padding: 36px 24px 28px;
    background: var(--custom-color, #2E7D8E);
    position: relative;
    overflow: hidden;
}
.tn-dangky-header::after {
    content: '';
    position: absolute;
    bottom: -30px; right: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.tn-dangky-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.25);
}
.tn-dangky-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.25;
}
.tn-dangky-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 0.93rem;
    margin: 0;
}

/* === BODY === */
.tn-form-col {
    padding: 32px 40px 36px;
    box-sizing: border-box;
    width: 100%;
}
@media (max-width: 767px) {
    .tn-form-col { padding: 24px 16px 28px; }
}

/* === Note === */
.tn-contact-note {
    background: rgba(var(--custom-color-rgb, 46,125,142), 0.07);
    border: 1px solid rgba(var(--custom-color-rgb, 46,125,142), 0.18);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.83rem;
    color: var(--custom-color, #2E7D8E);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === Form group === */
.tn-form-group {
    margin-bottom: 14px;
    position: relative;
}
.tn-form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}
.tn-required { color: #ef4444; margin-left: 2px; }
.tn-optional  { font-weight: 400; color: #9ca3af; font-size: 0.78rem; }

/* === Inputs === */
.tn-input {
    width: 100%;
    padding: 11px 15px;
    border: 1.5px solid #d1d9e0;
    border-radius: 10px;
    font-size: 0.91rem;
    color: #1f2937;
    background: #f9fafb;
    transition: all 0.2s;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.tn-input::placeholder { color: #9ca3af; }
.tn-input:focus {
    border-color: var(--custom-color, #2E7D8E);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(var(--custom-color-rgb, 46,125,142), 0.12);
}
.tn-input.tn-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.tn-textarea {
    resize: vertical;
    min-height: 88px;
    line-height: 1.5;
}

/* Select */
.tn-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Row 2 cột */
.tn-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .tn-row-2 { grid-template-columns: 1fr; } }

/* Error messages */
.tn-field-error, .tn-contact-error-msg {
    color: #ef4444;
    font-size: 0.79rem;
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 4px;
}
.tn-field-error.tn-show, .tn-contact-error-msg.tn-show { display: flex; }

/* === Submit button === */
.tn-form-submit { margin-top: 18px; }
.tn-btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--custom-color, #2E7D8E);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 14px rgba(var(--custom-color-rgb, 46,125,142), 0.3);
    position: relative;
    overflow: hidden;
}
.tn-btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.25s;
}
.tn-btn-submit:hover {
    background: var(--custom-color-hover, #1d5c6e);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--custom-color-rgb, 46,125,142), 0.38);
}
.tn-btn-submit:active { transform: translateY(0); }
.tn-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* === Alerts === */
.tn-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.87rem;
    margin-top: 14px;
    display: none;
    align-items: flex-start;
    gap: 10px;
}
.tn-alert.tn-show { display: flex; }
.tn-alert i { margin-top: 2px; flex-shrink: 0; }
.tn-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1.5px solid #bbf7d0;
}
.tn-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1.5px solid #fecaca;
}
