/* Application form: used by the public form (Views/General/Header.php)
   and the admin read-only view (Views/Admin/Forms/edit.view.php) */

.orange {
    color: #C45911;
}

.red {
    color: #C00000;
}

.blue {
    color: #0070C0;
}

.MainNumber,
.MainQuestion {
    color: #0070C0;
    font-size: 1.4rem;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: underline;
}

.MainQuestion .text-muted {
    color: #0070C0;
    font-size: 1rem;
    font-weight: normal;
    text-transform: capitalize;
    text-decoration: none;
}


.SubNumber,
.SubQuestion {
    font-size: 1.2rem;
    font-weight: normal;

}

.section {
    display: none;
}

.visible {
    display: block;
}


@keyframes blink {
    0% {
        border-color: red;
    }

    50% {
        border-color: transparent;
    }

    100% {
        border-color: red;
    }
}

.blink-border {
    animation: blink 1s infinite;
    border-left: 2px solid red;
}

/* ---- Application form layout ---- */
.FormPage {
    text-align: left; /* styles.css centers everything inside .wrapper */
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.FormPage h1 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

#VGApplication > section.section {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

#VGApplication .row {
    align-items: flex-start;
}

#VGApplication .MainNumber {
    white-space: nowrap;
}

#VGApplication .MainQuestion {
    text-decoration: none;
    padding-bottom: .4rem;
    /* underline that stays inside the column padding (a border would run to the card edge) */
    background: linear-gradient(#0070C0, #0070C0) no-repeat;
    background-size: calc(100% - 1.5rem) 2px;
    background-position: .75rem 100%;
}

#VGApplication .MainNumber {
    text-decoration: none;
}

#VGApplication .SubNumber,
#VGApplication .SubQuestion {
    font-size: 1.1rem;
    line-height: 1.45;
}

#VGApplication .SubNumber.text-end {
    color: #6c757d;
}

/* answers sit under their question */
#VGApplication .SubAnswer {
    margin-top: .5rem;
}

#VGApplication .SubAnswer:empty {
    display: none;
}

#VGApplication .form-control,
#VGApplication .form-select {
    font-size: 1rem;
}

#VGApplication .form-check {
    margin-bottom: .25rem;
}

#VGApplication .form-check-input {
    margin-top: .3rem;
}

#VGApplication .form-check-label {
    cursor: pointer;
}

/* owners / directors grid */
#VGApplication .GridHead > div {
    font-size: .95rem;
    text-align: left !important;
    color: #6c757d;
}

#VGApplication .GridLabel {
    font-weight: bold;
    color: #0070C0;
    margin-bottom: .35rem;
}

/* Back on the left, Next / Submit on the right */
#VGApplication .FormNav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

#VGApplication .FormNav .btn {
    min-width: 7.5rem;
    padding: .5rem 1rem;
}

@media (max-width: 767.98px) {
    /* site header: badge, logo and contact links stack instead of overlapping */
    header .container {
        padding: 10px .75rem;
    }

    header .years,
    header .header-contact {
        position: static;
        margin: 0;
    }

    header .years img {
        height: 56px;
        vertical-align: middle;
    }

    header .logo img {
        max-width: 170px;
    }

    header .header-contact {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: .25rem 1.25rem;
        margin-top: .5rem;
    }

    header .headline {
        font-size: .9rem;
        line-height: 1.35;
    }

    .FormPage h1 {
        font-size: 1.4rem;
    }

    #VGApplication > section.section {
        padding: 1rem .75rem;
    }

    #VGApplication .MainNumber,
    #VGApplication .MainQuestion {
        font-size: 1.1rem;
    }

    #VGApplication .SubNumber,
    #VGApplication .SubQuestion {
        font-size: 1rem;
    }

    /* phones: answers use the full width under the question */
    #VGApplication .SubAnswer {
        margin-left: 0;
        width: 100%;
    }

    #VGApplication .GridRow > div:not(.GridLabel) {
        margin-bottom: .5rem;
    }

    #VGApplication .FormNav .btn {
        min-width: 0;
        flex: 1 1 0;
    }
}

/* Step guide (left side bubbles) */
.StepGuide {
    list-style: none;
    margin: 0;
    padding: 0;
    position: sticky;
    top: 1rem;
    font-family: Arial, Helvetica, sans-serif;
}

.StepGuide li {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .3rem .25rem;
    color: #adb5bd;
    font-size: .9rem;
    position: relative;
    cursor: not-allowed;
}

.StepGuide li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(.25rem + 1rem - 1px);
    top: 2.3rem;
    bottom: -.3rem;
    width: 2px;
    background: #dee2e6;
}

.StepGuide .Bubble {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: .85rem;
    position: relative;
    z-index: 1;
}

.StepGuide li.done {
    color: #212529;
    cursor: pointer;
}

.StepGuide li.done .Bubble {
    background: #0070C0;
    border-color: #0070C0;
    color: #fff;
}

.StepGuide li.done:not(:last-child)::after {
    background: #0070C0;
}

.StepGuide li.active {
    color: #0070C0;
    font-weight: bold;
    cursor: default;
}

.StepGuide li.active .Bubble {
    border-color: #0070C0;
    background: #fff;
    color: #0070C0;
    box-shadow: 0 0 0 4px rgba(0, 112, 192, .2);
}

.StepGuide li.done:hover .StepLabel {
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .StepGuide {
        position: static;
        display: flex;
        overflow-x: auto;
        gap: .25rem;
        padding-bottom: .5rem;
    }

    .StepGuide li:not(:last-child)::after {
        display: none;
    }

    .StepGuide li:not(.active) .StepLabel {
        display: none;
    }

    .StepGuide li.active .StepLabel {
        white-space: nowrap;
    }
}

/* ---- Admin read-only view (captain/Applications/{id}, captain/Drafts/{id}) ---- */
.ReadOnlyForm #VGApplication > section.section {
    display: block;
    margin-bottom: 1.25rem;
    scroll-margin-top: 1rem;
}

.ReadOnlyForm .AnswerBox {
    padding: .5rem .85rem;
    margin-bottom: .5rem;
    font-size: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.ReadOnlyForm .AnswerEmpty {
    color: #6c757d;
    font-style: italic;
    border-style: dashed;
}

.ReadOnlyForm .AnswerPrefix {
    font-weight: bold;
    margin-right: .35rem;
}

.ReadOnlyForm .ChoiceIcon {
    margin-right: .4rem;
}

.ReadOnlyForm .ChoiceSelected {
    font-weight: bold;
    color: #0070C0;
}

.ReadOnlyForm .ChoiceOff {
    color: #6c757d;
}

.ReadOnlyForm .StepGuide li {
    cursor: pointer;
}

.ReadOnlyForm .StepGuide li.NotReached {
    opacity: .45;
}

@media print {
    nav,
    aside,
    .no-print {
        display: none !important;
    }

    .ReadOnlyForm .col-lg-9 {
        width: 100%;
    }

    .ReadOnlyForm #VGApplication > section.section {
        box-shadow: none;
        break-inside: avoid-page;
    }

    .ReadOnlyForm .AnswerBox {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
