/* ================================================
   Broward Bark Ambassador - Public Styles
   Mobile-first, navy blue brand
   ================================================ */

:root {
    --bba-navy:       #0d2b4e;
    --bba-navy-dark:  #091e38;
    --bba-navy-light: #1a4070;
    --bba-gold:       #f0a500;
    --bba-gold-hover: #d49300;
    --bba-white:      #ffffff;
    --bba-off-white:  #f7f9fc;
    --bba-border:     #d0dbe8;
    --bba-text:       #1a2740;
    --bba-muted:      #637080;
    --bba-success:    #0a7c44;
    --bba-error:      #c0392b;
    --bba-warning:    #b45309;
    --bba-radius:     10px;
    --bba-radius-sm:  6px;
    --bba-shadow:     0 4px 24px rgba(13,43,78,.12);
    --bba-transition: .2s ease;
    --bba-font-body:  'Nunito', 'Segoe UI', system-ui, sans-serif;
    --bba-font-head:  'Poppins', 'Nunito', system-ui, sans-serif;
}

/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Poppins:wght@600;700&display=swap');

/* --------------------------------
   Reset / Base
   -------------------------------- */
.bba-wrap *,
.bba-wrap *::before,
.bba-wrap *::after { box-sizing: border-box; }

.bba-wrap {
    font-family: var(--bba-font-body);
    color: var(--bba-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.bba-wrap a { color: var(--bba-navy); }
.bba-wrap a:hover { color: var(--bba-navy-light); }

/* --------------------------------
   Page backgrounds
   -------------------------------- */
.bba-page-bg {
    min-height: 100vh;
    background: var(--bba-navy);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px 48px;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------
   Logo
   -------------------------------- */
.bba-logo-wrap {
    text-align: center;
    margin-bottom: 24px;
}
.bba-logo-wrap img {
    max-width: 160px;
    height: auto;
}
.bba-logo-text {
    font-family: var(--bba-font-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--bba-white);
    letter-spacing: .5px;
}

/* --------------------------------
   Card
   -------------------------------- */
.bba-card {
    background: var(--bba-white);
    border-radius: var(--bba-radius);
    box-shadow: var(--bba-shadow);
    padding: 32px 28px;
    width: 100%;
    max-width: 520px;
}

.bba-card-title {
    font-family: var(--bba-font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--bba-navy);
    margin: 0 0 6px;
    text-align: center;
}

.bba-card-subtitle {
    font-size: 14px;
    color: var(--bba-muted);
    text-align: center;
    margin: 0 0 24px;
}

/* --------------------------------
   Floating Label Fields
   -------------------------------- */
.bba-field {
    position: relative;
    margin-bottom: 18px;
}

.bba-field-inner {
    position: relative;
    display: flex;
    align-items: center;
}

.bba-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--bba-muted);
    pointer-events: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bba-field-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.bba-field input,
.bba-field textarea {
    width: 100%;
    border: 1.5px solid var(--bba-border);
    border-radius: var(--bba-radius-sm);
    padding: 12px 14px;
    font-size: 15px;
    font-family: var(--bba-font-body);
    color: var(--bba-text);
    background: var(--bba-white);
    transition: border-color var(--bba-transition), box-shadow var(--bba-transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.bba-field.has-icon input,
.bba-field.has-icon textarea {
    padding-left: 42px;
}

.bba-field input:focus,
.bba-field textarea:focus {
    border-color: var(--bba-navy);
    background: var(--bba-white);
    box-shadow: 0 0 0 3px rgba(13,43,78,.1);
}

.bba-field label {
    display: block;
    position: static;
    font-size: 13px;
    font-weight: 500;
    color: var(--bba-navy);
    margin-bottom: 6px;
    margin-top: 0;
    padding: 0;
    transform: none;
    pointer-events: auto;
    white-space: normal;
    background: transparent;
    line-height: 1.4;
    z-index: auto;
}

.bba-field textarea { resize: vertical; }

/* Char counter */
.bba-char-counter {
    text-align: right;
    font-size: 11px;
    color: var(--bba-muted);
    margin-top: 3px;
}
.bba-char-counter.near-limit { color: var(--bba-warning); }
.bba-char-counter.at-limit   { color: var(--bba-error); }

/* Error state */
.bba-field.has-error input,
.bba-field.has-error textarea {
    border-color: var(--bba-error);
}
.bba-field-error {
    font-size: 12px;
    color: var(--bba-error);
    margin-top: 4px;
    display: none;
}
.bba-field.has-error .bba-field-error { display: block; }

/* --------------------------------
   Form rows (2-col grid on desktop)
   -------------------------------- */
.bba-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.bba-form-row-half {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
}

.bba-form-row-half .bba-field:last-child {
    visibility: hidden;
}

.bba-form-row .bba-field {
    margin-bottom: 0;
}

.bba-form-row .bba-field input {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .bba-form-row {
        grid-template-columns: 1fr;
    }
    .bba-form-row-half .bba-field:last-child {
        display: none;
    }
}

/* --------------------------------
   Buttons
   -------------------------------- */
.bba-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 28px;
    font-family: var(--bba-font-head);
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--bba-radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--bba-transition), transform var(--bba-transition), box-shadow var(--bba-transition);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    min-height: 44px;
}

.bba-btn-primary {
    background: var(--bba-gold);
    color: var(--bba-navy-dark);
}
.bba-btn-primary:hover,
.bba-btn-primary:focus {
    background: var(--bba-gold-hover);
    box-shadow: 0 4px 12px rgba(240,165,0,.35);
    transform: translateY(-1px);
    color: var(--bba-navy-dark);
    text-decoration: none;
}
.bba-btn-primary:active { transform: translateY(0); }

.bba-btn-secondary {
    background: transparent;
    color: var(--bba-navy);
    border: 2px solid var(--bba-border);
}
.bba-btn-secondary:hover { border-color: var(--bba-navy); background: var(--bba-off-white); }
.bba-cancel-task-btn { color: #888; border-color: #dde2e8; }
.bba-cancel-task-btn:hover { color: #cc1818 !important; border-color: #cc1818 !important; background: #fff5f5 !important; }

.bba-btn-navy {
    background: var(--bba-navy);
    color: var(--bba-white);
}
.bba-btn-navy:hover { background: var(--bba-navy-light); color: var(--bba-white); text-decoration: none; }

.bba-btn-block { width: 100%; }

.bba-btn:disabled,
.bba-btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --------------------------------
   Alerts / Notices
   -------------------------------- */
.bba-alert {
    padding: 12px 16px;
    border-radius: var(--bba-radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}
.bba-alert-success { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.bba-alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.bba-alert-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }
.bba-alert-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }

/* --------------------------------
   Signup Form specific
   -------------------------------- */
.bba-signup-form .bba-section-heading {
    font-family: var(--bba-font-head);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--bba-navy);
    border-bottom: 2px solid var(--bba-border);
    padding-bottom: 6px;
    margin: 24px 0 16px;
}

.bba-signup-form .bba-section-heading:first-child { margin-top: 0; }

/* --------------------------------
   Login form
   -------------------------------- */
.bba-login-note {
    text-align: center;
    font-size: 13px;
    color: var(--bba-muted);
    margin-top: 16px;
}

/* --------------------------------
   Dashboard
   -------------------------------- */
.bba-dashboard {
    background: var(--bba-off-white);
    min-height: 100vh;
}

.bba-dashboard-header {
    background: var(--bba-navy);
    color: var(--bba-white);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.bba-dashboard-brand {
    font-family: var(--bba-font-head);
    font-size: 17px;
    font-weight: 700;
    color: var(--bba-white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bba-dashboard-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bba-dashboard-nav a {
    color: rgba(255,255,255,.8);
    font-size: 13px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: var(--bba-radius-sm);
    transition: background var(--bba-transition), color var(--bba-transition);
    white-space: nowrap;
}
.bba-dashboard-nav a:hover,
.bba-dashboard-nav a.active {
    background: rgba(255,255,255,.15);
    color: var(--bba-white);
}

.bba-dashboard-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.bba-dashboard-section {
    background: var(--bba-white);
    border-radius: var(--bba-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    padding: 24px;
    margin-bottom: 24px;
}

.bba-dashboard-section h2 {
    font-family: var(--bba-font-head);
    font-size: 17px;
    font-weight: 700;
    color: var(--bba-navy);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bba-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --------------------------------
   Task Cards
   -------------------------------- */
.bba-task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.bba-task-card {
    border: 2px solid var(--bba-border);
    border-radius: var(--bba-radius);
    overflow: hidden;
    background: var(--bba-white);
    transition: transform var(--bba-transition), box-shadow var(--bba-transition), border-color var(--bba-transition);
}
.bba-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13,43,78,.12);
    border-color: var(--bba-navy);
}

.bba-task-card-img {
    width: 100%;
    aspect-ratio: 16/8;
    object-fit: cover;
    background: var(--bba-border);
    display: block;
}

.bba-task-card-img-placeholder {
    width: 100%;
    aspect-ratio: 16/8;
    background: linear-gradient(135deg, var(--bba-navy) 0%, var(--bba-navy-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.4);
    font-size: 32px;
}

.bba-task-card-body { padding: 14px; }

.bba-task-card-value {
    font-family: var(--bba-font-head);
    font-size: 18px;
    font-weight: 700;
    color: var(--bba-navy);
    margin-bottom: 4px;
}

.bba-task-card-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--bba-text);
}

.bba-task-card-desc {
    font-size: 13px;
    color: var(--bba-muted);
    margin-bottom: 10px;
    line-height: 1.5;
}

.bba-task-card-meta {
    font-size: 12px;
    color: var(--bba-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bba-task-card .bba-btn { width: 100%; height: 42px; font-size: 14px; }

.bba-progress-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--bba-off-white);
    border: 1px solid var(--bba-border);
    color: var(--bba-muted);
    margin-bottom: 10px;
}

/* --------------------------------
   Reward Picker
   -------------------------------- */
.bba-reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.bba-reward-option {
    border: 2px solid var(--bba-border);
    border-radius: var(--bba-radius);
    padding: 14px;
    cursor: pointer;
    transition: border-color var(--bba-transition), box-shadow var(--bba-transition), transform var(--bba-transition);
    text-align: center;
    background: var(--bba-white);
    position: relative;
}
.bba-reward-option:hover {
    border-color: var(--bba-navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,43,78,.1);
}
.bba-reward-option.selected {
    border-color: var(--bba-navy);
    background: rgba(13,43,78,.04);
    box-shadow: 0 0 0 3px rgba(13,43,78,.1);
}
.bba-reward-option input[type=radio] { display: none; }

.bba-reward-option-img {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 5 / 3;
    object-fit: cover;
    border-radius: var(--bba-radius-sm);
    margin-bottom: 8px;
}

.bba-reward-option-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--bba-text);
    line-height: 1.3;
}

.bba-reward-radio-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--bba-border);
    background: var(--bba-white);
    transition: all var(--bba-transition);
}
.bba-reward-option.selected .bba-reward-radio-dot {
    border-color: var(--bba-navy);
    background: var(--bba-navy);
    box-shadow: inset 0 0 0 3px var(--bba-white);
}

/* --------------------------------
   Submission Upload Area
   -------------------------------- */
.bba-upload-area {
    border: 2px dashed var(--bba-border);
    border-radius: var(--bba-radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--bba-transition), background var(--bba-transition);
    background: var(--bba-off-white);
    margin-bottom: 16px;
}
.bba-upload-area:hover,
.bba-upload-area.drag-over {
    border-color: var(--bba-navy);
    background: rgba(13,43,78,.04);
}
.bba-upload-area-icon { font-size: 32px; margin-bottom: 8px; }
.bba-upload-area-text { font-size: 14px; color: var(--bba-muted); }
.bba-upload-area-text strong { color: var(--bba-navy); }
.bba-upload-area-sub  { font-size: 12px; color: var(--bba-muted); margin-top: 4px; }

.bba-file-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.bba-file-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--bba-radius-sm);
    overflow: hidden;
    border: 1px solid var(--bba-border);
}
.bba-file-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.bba-file-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,.65);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* --------------------------------
   Earnings History Table
   -------------------------------- */
.bba-earnings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.bba-earnings-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--bba-muted);
    border-bottom: 2px solid var(--bba-border);
    padding: 6px 8px;
}
.bba-earnings-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--bba-border);
    vertical-align: top;
}

/* --------------------------------
   Status Pills
   -------------------------------- */
.bba-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
}
.bba-pill-pending  { background: #fef9c3; color: #92400e; }
.bba-pill-approved { background: #dcfce7; color: #14532d; }
.bba-pill-rejected { background: #fee2e2; color: #7f1d1d; }
.bba-pill-fulfilled { background: #d1fae5; color: #065f46; }
.bba-pill-processing { background: #dbeafe; color: #1e3a8a; }

/* --------------------------------
   Profile Edit Form
   -------------------------------- */
.bba-profile-form .bba-field { margin-bottom: 16px; }

/* --------------------------------
   Ambassador Spotlight
   -------------------------------- */
.bba-spotlight-wrap {
    margin-top: 32px;
    text-align: center;
    min-height: 44px;
    padding: 0 16px;
}

.bba-spotlight-ticker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 30px;
    padding: 8px 18px;
    max-width: 480px;
    width: 100%;
}

.bba-spotlight-dot {
    width: 8px;
    height: 8px;
    background: var(--bba-gold);
    border-radius: 50%;
    flex-shrink: 0;
    animation: bba-pulse 2s ease-in-out infinite;
}

@keyframes bba-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(.8); }
}

.bba-spotlight-text {
    font-size: 13px;
    color: rgba(255,255,255,.85);
    text-align: left;
    line-height: 1.4;
    min-height: 18px;
    transition: opacity .4s ease;
}

/* --------------------------------
   Loading spinner
   -------------------------------- */
.bba-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,.3);
    border-top-color: var(--bba-white);
    border-radius: 50%;
    animation: bba-spin .7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}
.bba-spinner-navy {
    border-color: rgba(13,43,78,.2);
    border-top-color: var(--bba-navy);
}

@keyframes bba-spin { to { transform: rotate(360deg); } }

/* --------------------------------
   Empty State
   -------------------------------- */
.bba-empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--bba-muted);
}
.bba-empty-state-icon { font-size: 36px; margin-bottom: 10px; }
.bba-empty-state-text { font-size: 14px; }

/* --------------------------------
   Responsive
   -------------------------------- */
@media (max-width: 600px) {
    .bba-card {
        padding: 20px 14px;
        border-radius: var(--bba-radius);
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        margin: 0;
    }
    .bba-page-bg {
        padding: 16px 8px 32px;
    }

    .bba-task-grid {
        grid-template-columns: 1fr;
    }

    .bba-reward-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bba-dashboard-body {
        padding: 16px 12px 32px;
    }

    .bba-dashboard-section {
        padding: 16px;
    }

    .bba-dashboard-nav a {
        font-size: 12px;
        padding: 4px 8px;
    }
}

@media (max-width: 380px) {
    .bba-reward-grid {
        grid-template-columns: 1fr;
    }
}
