/**
 * Fundme multi-step submission form styles
 * Targets Bootstrap 5 (Joomla 6 default template)
 */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.fundme-submission-form-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* ── Progress / step navigator ────────────────────────────────────────────── */
.fundme-steps-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: none;
    gap: 0;
}

.fundme-step-item {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
    padding: 0.5rem 0.75rem;
    border-bottom: 3px solid #dee2e6;
    color: #6c757d;
    font-size: 0.875rem;
    transition: border-color 0.2s, color 0.2s;
    cursor: pointer;
    user-select: none;
}

/* Hover on any step */
.fundme-step-item:hover {
    border-bottom-color: #adb5bd;
    color: #495057;
}
.fundme-step-item:hover .fundme-step-number {
    background: #adb5bd;
    color: #fff;
}

/* Connector line between steps */
.fundme-step-item:not(:last-child)::after {
    content: '';
    display: none; /* handled by flex gap + border */
}

.fundme-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

/* Visited (completed) step */
.fundme-step-item.is-visited {
    border-bottom-color: #717171;
    color: #717171  ;
}
.fundme-step-item.is-visited .fundme-step-number {
    background: #717171;
    color: #fff;
}
.fundme-step-item.is-visited:hover {
    border-bottom-color: #212529;
    color: #212529;
}
.fundme-step-item.is-visited:hover .fundme-step-number {
    background: #212529;
}

/* Active (current) step */
.fundme-step-item.is-active {
    border-bottom-color: #234591;
    color: #234591;
    font-weight: 600;
}
.fundme-step-item.is-active .fundme-step-number {
    background: #234591;
    color: #fff;
}

/* Step with validation errors */
.fundme-step-item.has-errors {
    border-bottom-color: #ffc107;
}
.fundme-step-item.has-errors .fundme-step-number {
    background: #ffc107;
    color: #000;
}

/* Mobile: hide labels, show only numbers */
@media (max-width: 576px) {
    .fundme-step-label {
        display: none;
    }
    .fundme-step-item {
        flex: 0 0 auto;
        padding: 0.5rem;
    }
}

/* ── Step panels ──────────────────────────────────────────────────────────── */
.fundme-step-panel {
    display: none;
    animation: fundme-fadein 0.2s ease;
}

.fundme-step-panel.is-active {
    display: block;
}

@keyframes fundme-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

.fundme-step-title {
    font-size: 1.25rem !important;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    margin-top: 20px !important;
    border-bottom: 1px solid #dee2e6;
    font-weight: normal;
    font-family: 'Titillium Web';
    display: inline-block;
    width: 100%;
}

.fundme-step-subtitle {
    font-size: 1rem !important;
    margin-bottom: 1rem;
    color: #6c757d;
    font-family: 'Titillium Web';
}

.fundme-step-counter {
    font-weight: 400;
}

/* ── Validation ───────────────────────────────────────────────────────────── */
.fundme-field-error {
    margin-top: 0.25rem;
}

/* ── File upload UI ───────────────────────────────────────────────────────── */
.fundme-file-field>.controls {
    margin-bottom: 15px;
}
.fundme-file-field>.controls .control-group {
    margin-bottom: 0 !important;
}

.fundme-upload-item {
    margin-top: 0;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    padding: 0.3rem 10px;
    font-size: 0.875rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.fundme-upload-item:last-child {
    border-bottom: 1px solid #eee;
}

.fundme-upload-item--new {
    animation: fundme-fadein 0.25s ease;
}

.fundme-upload-item--pending {
    color: #6c757d;
}

@keyframes fundme-spin {
    to { transform: rotate(360deg); }
}

.fundme-upload-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #dee2e6;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: fundme-spin 0.75s linear infinite;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.fundme-upload-filename {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* ── Navigation ───────────────────────────────────────────────────────────── */
.fundme-navigation {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

/* Spinner on button during AJAX */
.fundme-navigation button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── Review summary panel (last step) ────────────────────────────────────── */
.fundme-review {
    margin-bottom: 1.5rem;
}
.fundme-review .uk-card-small .uk-card-title {
    font-size: 120%;
    padding: 10px 20px;
    margin-bottom: 0;
    background: #ededed;
}
.fundme-review .uk-card {
    margin-bottom: 20px;
}
.fundme-review .uk-card-small .uk-table {
    margin-top: 0;
    margin-bottom: 0;
}
.fundme-review .subform-table th:first-child,
.fundme-review .subform-table td:first-child {
    padding-left: 0;
}
.fundme-review .subform-table th, 
.fundme-review .subform-table td {
    padding-bottom: 0;
}

.fundme-review .td-label {
    width:30%;
    max-width:200px;
}
/*
.fundme-review-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #212529;
}

.fundme-review-card .card-header {
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
}

.fundme-review-card .card-header strong {
    font-size: 0.9rem;
}

.fundme-review-edit-btn {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}
*/

dl.subtitle {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 5px !important;
}
dl.subtitle dt {
    font-weight: bold !important;
}

.fundme-review-dl dt,
.fundme-review-dl dd {
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.fundme-review-dl dt {
    padding-top: 0.1rem;
}

/* Collapse excessive whitespace in empty review sections */
.fundme-review-card .card-body {
    padding: 0.5rem 0.75rem;
}

/* form overrides */
.control-group {
    margin-bottom: 15px !important;
}
.control-label {
    margin-bottom: 0 !important;
}
.control-group.field-spacer {
    margin-bottom: 0px !important;
}