/* =========================================
   BROOKEVIEW CARE LTD – Application Form
   ========================================= */

:root {
    --bcaf-red:       #8B1A1A;
    --bcaf-red-dark:  #6a1313;
    --bcaf-red-light: #f9f0f0;
    --bcaf-cream:     #f9f6f2;
    --bcaf-gold:      #c49a4a;
    --bcaf-text:      #2c2c2c;
    --bcaf-muted:     #7a7a7a;
    --bcaf-border:    #e2d8ce;
    --bcaf-white:     #ffffff;
    --bcaf-radius:    6px;
    --bcaf-shadow:    0 2px 16px rgba(139,26,26,.10);
    --bcaf-font-body: 'Georgia', 'Times New Roman', serif;
    --bcaf-font-ui:   -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- WRAPPER ---- */
.bcaf-wrapper {
    font-family: var(--bcaf-font-ui);
    color: var(--bcaf-text);
    max-width: 860px;
    margin: 0 auto 60px;
}

/* ---- HEADER ---- */
.bcaf-header {
    background: linear-gradient(135deg, var(--bcaf-red) 0%, var(--bcaf-red-dark) 100%);
    border-radius: 10px 10px 0 0;
    padding: 36px 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.bcaf-header::before {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
}
.bcaf-header-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bcaf-logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}
.bcaf-logo-icon {
    font-size: 28px;
    opacity: .8;
}
.bcaf-brand-link {
    color: #fff;
    font-family: var(--bcaf-font-body);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.4);
    transition: border-color .2s;
}
.bcaf-brand-link:hover { border-color: #fff; }
.bcaf-tagline {
    margin: 2px 0 0;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: .7;
}
.bcaf-page-title {
    margin: 0;
    font-family: var(--bcaf-font-body);
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ---- INTRO ---- */
.bcaf-intro {
    background: var(--bcaf-red-light);
    border-left: 4px solid var(--bcaf-red);
    padding: 20px 28px;
    margin: 0 0 4px;
}
.bcaf-intro p {
    margin: 0;
    font-family: var(--bcaf-font-body);
    font-size: 15px;
    line-height: 1.75;
    color: #3a2020;
}
.bcaf-brand-inline {
    color: var(--bcaf-red);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dotted var(--bcaf-red);
    transition: border-style .2s;
}
.bcaf-brand-inline:hover { border-style: solid; }

/* ---- FORM ---- */
.bcaf-form {
    background: var(--bcaf-white);
    box-shadow: var(--bcaf-shadow);
}

/* ---- SECTION ---- */
.bcaf-section {
    border-bottom: 1px solid var(--bcaf-border);
}
.bcaf-section:last-of-type { border-bottom: none; }

.bcaf-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 36px;
    background: var(--bcaf-cream);
    border-bottom: 1px solid var(--bcaf-border);
    cursor: default;
}
.bcaf-section-num {
    font-family: var(--bcaf-font-body);
    font-size: 28px;
    font-weight: 700;
    color: var(--bcaf-red);
    opacity: .25;
    line-height: 1;
    min-width: 36px;
}
.bcaf-section-header h2 {
    margin: 0;
    font-family: var(--bcaf-font-body);
    font-size: 18px;
    font-weight: 400;
    color: var(--bcaf-text);
    letter-spacing: 0.5px;
}

.bcaf-section-body {
    padding: 28px 36px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---- ROWS / COLUMNS ---- */
.bcaf-row {
    display: grid;
    gap: 18px;
}
.bcaf-col-2 { grid-template-columns: 1fr 1fr; }
.bcaf-col-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ---- FIELDS ---- */
.bcaf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bcaf-field label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--bcaf-muted);
}
.bcaf-req { color: var(--bcaf-red); }

.bcaf-field input[type="text"],
.bcaf-field input[type="email"],
.bcaf-field input[type="tel"],
.bcaf-field input[type="date"],
.bcaf-field input[type="month"],
.bcaf-field select,
.bcaf-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--bcaf-border);
    border-radius: var(--bcaf-radius);
    font-size: 14px;
    font-family: var(--bcaf-font-ui);
    color: var(--bcaf-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
}
.bcaf-field input:focus,
.bcaf-field select:focus,
.bcaf-field textarea:focus {
    border-color: var(--bcaf-red);
    box-shadow: 0 0 0 3px rgba(139,26,26,.08);
}
.bcaf-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238B1A1A'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.bcaf-field textarea { resize: vertical; }

/* ---- RADIO GROUP ---- */
.bcaf-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 8px 0;
}
.bcaf-radio {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--bcaf-text);
}
.bcaf-radio input[type="radio"] {
    accent-color: var(--bcaf-red);
    width: 16px; height: 16px;
    cursor: pointer;
}

/* ---- UPLOAD BOX ---- */
.bcaf-upload-note {
    font-size: 13px;
    color: var(--bcaf-muted);
    margin: 0;
    padding: 0;
}
.bcaf-upload-box {
    border: 2px dashed var(--bcaf-border);
    border-radius: var(--bcaf-radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: var(--bcaf-cream);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.bcaf-upload-box:hover {
    border-color: var(--bcaf-red);
    background: var(--bcaf-red-light);
}
.bcaf-upload-box.drag-over {
    border-color: var(--bcaf-red);
    background: var(--bcaf-red-light);
}
.bcaf-upload-icon { font-size: 28px; }
.bcaf-upload-box p {
    margin: 0;
    font-size: 13px;
    color: var(--bcaf-muted);
}
.bcaf-file-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    width: 100%;
}
.bcaf-file-item {
    font-size: 12px;
    color: var(--bcaf-red);
    background: rgba(139,26,26,.06);
    padding: 4px 10px;
    border-radius: 3px;
}

/* ---- WORK HISTORY ---- */
.bcaf-history-entry {
    border: 1.5px solid var(--bcaf-border);
    border-radius: var(--bcaf-radius);
    overflow: hidden;
    margin-bottom: 16px;
}
.bcaf-history-header {
    background: var(--bcaf-cream);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--bcaf-muted);
    border-bottom: 1px solid var(--bcaf-border);
}
.bcaf-remove-history {
    background: none;
    border: 1px solid #ddd;
    color: #c0392b;
    cursor: pointer;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 3px;
    transition: background .2s;
}
.bcaf-remove-history:hover { background: #fff0f0; }
.bcaf-history-entry > .bcaf-row,
.bcaf-history-entry > .bcaf-field {
    padding: 16px 18px 0;
}
.bcaf-history-entry > *:last-child { padding-bottom: 16px; }

/* Wrap inner content of history entry */
.bcaf-history-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bcaf-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1.5px dashed var(--bcaf-red);
    color: var(--bcaf-red);
    background: transparent;
    padding: 10px 22px;
    border-radius: var(--bcaf-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s, color .2s;
}
.bcaf-btn-add:hover { background: var(--bcaf-red-light); }
.bcaf-btn-add span { font-size: 18px; font-weight: 300; line-height: 1; }

/* ---- SUBMIT ---- */
.bcaf-submit-area {
    padding: 28px 36px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: var(--bcaf-cream);
    border-top: 1px solid var(--bcaf-border);
}
.bcaf-submit-note {
    margin: 0;
    font-size: 13px;
    color: var(--bcaf-muted);
    text-align: center;
    max-width: 500px;
    line-height: 1.6;
}
.bcaf-btn-submit {
    background: linear-gradient(135deg, var(--bcaf-red) 0%, var(--bcaf-red-dark) 100%);
    color: #fff;
    border: none;
    padding: 16px 52px;
    border-radius: var(--bcaf-radius);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    box-shadow: 0 4px 14px rgba(139,26,26,.3);
}
.bcaf-btn-submit:hover { opacity: .9; transform: translateY(-1px); }
.bcaf-btn-submit:active { transform: translateY(0); }
.bcaf-btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---- ERROR / SUCCESS ---- */
.bcaf-error-msg {
    margin: 0 36px 20px;
    padding: 14px 18px;
    background: #fff0f0;
    border: 1px solid #f5c6c6;
    border-left: 4px solid #c0392b;
    border-radius: var(--bcaf-radius);
    color: #c0392b;
    font-size: 14px;
}
.bcaf-success-msg {
    margin: 0 0 24px;
    padding: 52px 24px;
    text-align: center;
    background: var(--bcaf-white);
    box-shadow: var(--bcaf-shadow);
    border-radius: var(--bcaf-radius);
}
.bcaf-success-inner { max-width: 480px; margin: 0 auto; }
.bcaf-success-icon {
    display: inline-block;
    width: 64px; height: 64px;
    background: var(--bcaf-red);
    color: #fff;
    border-radius: 50%;
    font-size: 32px;
    line-height: 64px;
    margin-bottom: 20px;
}
.bcaf-success-inner h3 {
    font-family: var(--bcaf-font-body);
    font-size: 26px;
    font-weight: 400;
    color: var(--bcaf-text);
    margin: 0 0 12px;
}
.bcaf-success-inner p {
    color: var(--bcaf-muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 24px;
}
.bcaf-btn-home {
    display: inline-block;
    background: var(--bcaf-red);
    color: #fff;
    padding: 12px 32px;
    border-radius: var(--bcaf-radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: opacity .2s;
}
.bcaf-btn-home:hover { opacity: .88; }

/* ---- FOOTER ---- */
.bcaf-footer {
    margin-top: 16px;
    padding: 18px 36px;
    background: var(--bcaf-red-dark);
    border-radius: 0 0 10px 10px;
    color: rgba(255,255,255,.7);
    font-size: 13px;
    text-align: center;
}
.bcaf-footer-brand {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-family: var(--bcaf-font-body);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
    .bcaf-header { padding: 24px 20px; }
    .bcaf-page-title { font-size: 22px; }
    .bcaf-section-body { padding: 20px; }
    .bcaf-section-header { padding: 16px 20px; }
    .bcaf-submit-area { padding: 24px 20px; }
    .bcaf-col-2,
    .bcaf-col-3 { grid-template-columns: 1fr; }
    .bcaf-footer { padding: 16px 20px; }
    .bcaf-error-msg { margin: 0 20px 16px; }
}
