/* ==========================================================================
   State compliance checklist
   Built on the site tokens in static/css/styles.css. Everything is cc- prefixed.
   ========================================================================== */

/* ---- Hero --------------------------------------------------------------- */
.cc-hero { border-left: 3px solid var(--hoa-green); }
.cc-hero__body { padding: 28px 30px 26px; }
.cc-hero__title {
    font-size: 30px;
    font-weight: 600;
    color: var(--hoa-deep-purple);
    letter-spacing: -0.02em;
    margin: 6px 0 8px;
}
.cc-hero__lead {
    font-size: 16px;
    color: var(--gray-700);
    max-width: 680px;
    margin-bottom: 20px;
}

.cc-setup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px 18px;
    align-items: end;
    max-width: 760px;
}
.cc-setup .form-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.cc-setup .form-select { border-color: var(--gray-300); }

/* Segmented control (condo / HOA) */
.cc-seg {
    display: inline-flex;
    padding: 3px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}
.cc-seg__btn {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background-color .15s var(--ease), color .15s var(--ease);
}
.cc-seg__btn:hover { color: var(--hoa-slate-blue-dark); }
.cc-seg__btn.is-active {
    background: var(--white);
    color: var(--hoa-slate-blue-dark);
    box-shadow: var(--shadow-sm);
}

/* ---- Progress strip ----------------------------------------------------- */
.cc-progress {
    display: flex;
    align-items: center;
    gap: 14px 20px;
    flex-wrap: wrap;
    padding: 14px 22px;
    position: sticky;
    top: 0;
    z-index: 5;
    overflow: visible;
}
.cc-progress__text { font-size: 14px; color: var(--gray-700); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-progress__text strong { color: var(--gray-900); }
.cc-progress__sep { width: 1px; height: 16px; background: var(--gray-300); }
.cc-progress__gaps { color: var(--warning); font-weight: 500; }
.cc-progress__fin {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--hoa-forest-green-light);
    color: var(--hoa-forest-green-dark);
}
.cc-progress__bar {
    flex: 1 1 160px;
    height: 8px;
    background: var(--gray-100);
    border-radius: 999px;
    overflow: hidden;
}
.cc-progress__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--hoa-green) 0%, var(--hoa-forest-green) 100%);
    border-radius: 999px;
    transition: width .3s var(--ease);
}
.cc-progress__actions { gap: 8px; }

/* ---- 68 / 32 grid ------------------------------------------------------- */
.cc-grid { display: block; }
@media (min-width: 992px) {
    .cc-grid {
        display: grid;
        grid-template-columns: minmax(0, 68fr) minmax(0, 32fr);
        gap: 24px;
        align-items: start;
    }
}

/* ---- Category groups ---------------------------------------------------- */
.cc-group__title { display: flex; align-items: center; gap: 10px; }
.cc-group__title i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--hoa-slate-blue-light);
    color: var(--hoa-slate-blue);
    font-size: 13px;
}
.cc-group__count { font-size: 12px; color: var(--gray-500); }

.cc-items { list-style: none; margin: 0; padding: 0; }

/* ---- Item --------------------------------------------------------------- */
.cc-item {
    position: relative;
    padding: 18px 22px 18px 25px;
    border-top: 1px solid var(--gray-200);
    cursor: pointer;
    outline: none;
    transition: background-color .15s var(--ease);
}
.cc-item:first-child { border-top: 0; }
.cc-item::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: transparent;
    transition: background-color .15s var(--ease);
}
.cc-item:hover { background: var(--gray-50); }
.cc-item.is-selected { background: var(--hoa-slate-blue-light); }
.cc-item.is-selected::before { background: var(--hoa-slate-blue); }
.cc-item[data-state="done"]::before { background: var(--hoa-green); }
.cc-item[data-state="not_done"]::before { background: var(--hoa-terracotta); }
.cc-item[data-state="not_sure"]::before { background: var(--warning); }

.cc-item__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cc-item__title { font-size: 16px; font-weight: 600; color: var(--gray-900); margin: 0 0 4px; line-height: 1.35; }
.cc-item[data-state="na"] .cc-item__title,
.cc-item[data-state="na"] .cc-item__explain { color: var(--gray-500); }
.cc-item__explain { font-size: 14px; color: var(--gray-700); margin: 0 0 12px; max-width: 640px; }

.cc-tag {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
}
.cc-tag--fin { background: var(--hoa-forest-green-light); color: var(--hoa-forest-green-dark); }

/* Status buttons */
.cc-status { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-status__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    transition: all .15s var(--ease);
}
.cc-status__btn i { font-size: 11px; color: var(--gray-500); }
.cc-status__btn:hover { border-color: var(--hoa-slate-blue); color: var(--hoa-slate-blue-dark); }
.cc-status__btn:focus-visible { outline: 2px solid var(--hoa-slate-blue); outline-offset: 2px; }
.cc-status__btn--na { color: var(--gray-500); }

.cc-status__btn[data-status="done"][aria-checked="true"] {
    background: var(--hoa-forest-green-light); border-color: var(--hoa-forest-green); color: var(--hoa-forest-green-dark);
}
.cc-status__btn[data-status="done"][aria-checked="true"] i { color: var(--hoa-forest-green); }
.cc-status__btn[data-status="not_done"][aria-checked="true"] {
    background: var(--hoa-terracotta-light); border-color: var(--hoa-terracotta); color: #9A4F10;
}
.cc-status__btn[data-status="not_done"][aria-checked="true"] i { color: var(--hoa-terracotta); }
.cc-status__btn[data-status="not_sure"][aria-checked="true"] {
    background: var(--warning-light); border-color: var(--warning); color: var(--warning);
}
.cc-status__btn[data-status="not_sure"][aria-checked="true"] i { color: var(--warning); }
.cc-status__btn[data-status="na"][aria-checked="true"] {
    background: var(--gray-100); border-color: var(--gray-500); color: var(--gray-700);
}

/* Dates */
.cc-dates { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 12px; }
.cc-dates__field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--gray-500); margin: 0; }
.cc-dates__field input { width: 170px; border-color: var(--gray-300); }

.cc-warn {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--warning);
    background: var(--warning-light);
    border-radius: var(--radius);
}
.cc-warn[hidden] { display: none; }
.cc-warn i { margin-top: 2px; }

/* Item actions */
.cc-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.cc-item__actions:empty { display: none; }
.cc-sync {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hoa-forest-green-dark);
    background: var(--hoa-forest-green-light);
    border: 1px solid rgba(44, 122, 56, .25);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all .15s var(--ease);
}
.cc-sync img { border-radius: 3px; }
.cc-sync:hover { background: var(--hoa-forest-green); color: var(--white); border-color: var(--hoa-forest-green); }
.cc-item[data-state="not_done"] .cc-sync,
.cc-item[data-state="not_sure"] .cc-sync { box-shadow: 0 0 0 3px rgba(93, 180, 53, .18); }
.cc-crosslink { font-size: 13px; font-weight: 500; color: var(--hoa-deep-purple); text-decoration: none; }
.cc-crosslink:hover { color: var(--hoa-purple-dark); text-decoration: underline; }
.cc-crosslink i { margin-right: 4px; }

.cc-law-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--hoa-slate-blue);
    background: none;
    border: 0;
}
.cc-law-toggle__chev { font-size: 10px; transition: transform .2s var(--ease); }
.cc-law-toggle[aria-expanded="true"] .cc-law-toggle__chev { transform: rotate(180deg); }

/* ---- Citations (panel and inline) -------------------------------------- */
.cc-cites { list-style: none; margin: 0; padding: 0; }
.cc-cites li { padding: 10px 0; border-top: 1px solid var(--gray-200); font-size: 13px; color: var(--gray-500); }
.cc-cites li:first-child { border-top: 0; padding-top: 0; }
.cc-cites a { display: inline-block; font-weight: 600; color: var(--hoa-slate-blue-dark); text-decoration: none; margin-right: 6px; }
.cc-cites a:hover { text-decoration: underline; }
.cc-cites a i { font-size: 10px; margin-left: 3px; color: var(--gray-500); }
.cc-cites span { display: block; }
.cc-cites--inline {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--hoa-slate-blue-light);
    border-radius: var(--radius);
}
.cc-cites--inline li { border-top-color: rgba(71, 91, 123, .15); }

/* ---- Side panel --------------------------------------------------------- */
.cc-panel__sticky { position: sticky; top: 84px; }

.cc-law { border-top: 3px solid var(--hoa-slate-blue); }
.cc-law__head { padding: 18px 20px 10px; }
.cc-law__title { font-size: 17px; font-weight: 600; color: var(--gray-900); margin: 4px 0 0; line-height: 1.35; }
.cc-law__body { padding: 4px 20px 16px; font-size: 14px; color: var(--gray-700); }
.cc-law__acts { margin-bottom: 10px; }
.cc-law__hint { font-size: 13px; color: var(--gray-500); margin: 0; }
.cc-law__hint i { margin-right: 4px; }
.cc-law__none { font-size: 13px; color: var(--gray-500); margin: 0; }
.cc-law__rule {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 13px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}
.cc-law__rule strong { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 2px; }
.cc-law__foot { padding: 14px 20px 18px; border-top: 1px solid var(--gray-200); background: var(--gray-50); }
.cc-law__foot .status-pill { margin-bottom: 8px; }

.cc-disclaimer { font-size: 12px; line-height: 1.5; color: var(--gray-500); }
.cc-disclaimer i { margin-right: 4px; }

/* HOA Fiscal card */
.cc-fiscal {
    padding: 18px 20px;
    border-left: 3px solid var(--hoa-green);
    background: linear-gradient(180deg, var(--hoa-forest-green-light) 0%, var(--white) 70%);
}
.cc-fiscal__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cc-fiscal__logo { width: 36px; height: 36px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-xs); }
.cc-fiscal__name { font-weight: 700; color: var(--gray-900); line-height: 1.2; }
.cc-fiscal__tag { font-size: 12px; color: var(--gray-500); }
.cc-fiscal__msg { font-size: 14px; color: var(--gray-700); margin-bottom: 14px; }
.cc-fiscal__msg strong { color: var(--hoa-forest-green-dark); }
.cc-fiscal__fine { font-size: 12px; color: var(--gray-500); margin: 8px 0 0; text-align: center; }

/* ---- Phone action bar --------------------------------------------------- */
.cc-mobilebar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1020;
    display: flex;
    gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -4px 12px rgba(15, 23, 42, .06);
    backdrop-filter: blur(6px);
}
@media (max-width: 991.98px) {
    main, .main-content { padding-bottom: 72px; }
    .cc-list { margin-bottom: 80px; }
}

/* ---- Save modal --------------------------------------------------------- */
.cc-modal { border: 0; border-radius: var(--radius-lg); box-shadow: 0 20px 40px rgba(15, 23, 42, .18); }
.cc-modal .modal-header { align-items: flex-start; border-bottom-color: var(--gray-200); padding: 20px 22px 14px; }
.cc-modal .modal-title { font-weight: 600; color: var(--gray-900); margin-top: 4px; }
.cc-modal .modal-body { padding: 18px 22px; }
.cc-modal .modal-footer { border-top-color: var(--gray-200); background: var(--gray-50); }
.cc-consent { font-size: 13px; color: var(--gray-700); }
.cc-sent { text-align: center; padding: 10px 6px 4px; }
.cc-sent[hidden] { display: none; }
.cc-sent__icon {
    width: 56px; height: 56px;
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--hoa-forest-green-light);
    color: var(--hoa-forest-green);
    font-size: 22px;
}

/* ---- Small screens ------------------------------------------------------ */
@media (max-width: 767.98px) {
    .cc-hero__body { padding: 22px 18px; }
    .cc-hero__title { font-size: 24px; }
    .cc-setup { grid-template-columns: 1fr 1fr; }
    .cc-setup__field:nth-child(2) { grid-column: 1 / -1; order: -1; }
    .cc-seg { display: flex; }
    .cc-seg__btn { flex: 1; text-align: center; }
    .cc-progress { padding: 12px 16px; }
    .cc-item { padding: 16px 16px 16px 19px; }
    .cc-status__btn { flex: 1 1 calc(50% - 6px); justify-content: center; }
    .cc-dates__field { flex: 1 1 140px; }
    .cc-dates__field input { width: 100%; }
}
