/* Shared form presentation for authenticated application pages. */
:root {
    --app-form-radius: 0.5rem;
    --app-form-spacing: 1.25rem;
}

.offcanvas.offcanvas-end {
    --bs-offcanvas-width: 440px;
    left: auto;
    right: 0;
    max-width: 100vw;
}

.offcanvas.offcanvas-end.show,
.offcanvas.offcanvas-end.showing {
    transform: translateX(0);
}

#taxi-editor {
    --bs-offcanvas-width: 430px;
    --bs-offcanvas-bg: #2b313c;
    --bs-offcanvas-color: #f3f5f8;
    --bs-offcanvas-border-width: 0;
    box-shadow: -12px 0 24px rgba(0, 0, 0, 0.28);
}

#taxi-editor .offcanvas-header {
    min-height: 76px;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    align-items: center;
    background: rgba(0, 0, 0, 0.06);
}

#taxi-editor .offcanvas-title {
    font-size: clamp(2rem, 2vw, 2.3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

#taxi-editor .offcanvas-body {
    padding: 1.25rem 1.5rem 1.5rem;
    background: #2b313c;
}

#taxi-editor .btn-close {
    opacity: 1;
    filter: invert(1) grayscale(100%) brightness(1.8);
    margin-inline-start: auto;
}

.taxi-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 1.5rem;
}

.taxi-tabs .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border: 0;
    border-radius: 0;
    padding: 0.5rem 0.75rem 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    background: transparent;
    margin-right: 0.75rem;
}

.taxi-tabs .nav-link.active {
    color: #8bb7ff;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 2px solid #8bb7ff;
}

.taxi-driver-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    padding: 1.5rem 1.5rem 1rem;
    color: #f5f7fb;
}

.taxi-driver-help {
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.taxi-driver-controls {
    display: flex;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.taxi-driver-field {
    flex: 1 1 0;
    min-width: 220px;
}

.taxi-driver-email-field {
    flex: 2 1 0;
}

.taxi-driver-scope-field {
    flex: 1.2 1 0;
}

.taxi-driver-label {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #edf2f9;
}

.taxi-driver-input .input-group-text,
.taxi-driver-input .form-control,
.taxi-driver-input .form-select {
    min-height: 3.25rem;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.02);
    color: #f5f7fb;
}

.taxi-driver-input .input-group-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.2rem;
}

.taxi-driver-input .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.taxi-driver-input .form-select {
    background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.8) 50%), linear-gradient(135deg, rgba(255,255,255,0.8) 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.taxi-driver-action {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.taxi-driver-submit {
    min-width: 220px;
    min-height: 3.25rem;
    background: linear-gradient(180deg, #5fa3ff 0%, #5b8df4 100%);
    border: 0;
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 0.6rem;
    box-shadow: 0 8px 18px rgba(91, 141, 244, 0.35);
}

.taxi-driver-submit:hover {
    background: linear-gradient(180deg, #6aa7ff 0%, #5f8cf4 100%);
    color: white;
}

.taxi-driver-list {
    min-height: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.taxi-invite-form {
    display: none;
}

#offcanvasBookShift {
    --bs-offcanvas-width: 640px;
}

.offcanvas-header,
.modal-header {
    padding: var(--app-form-spacing);
    border-bottom: 1px solid var(--bs-border-color);
    gap: 1rem;
}

.offcanvas-header :is(h2, h3, h4, h5, .offcanvas-title),
.modal-header .modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.offcanvas-body,
.modal-body {
    padding: var(--app-form-spacing);
}

.modal-footer {
    padding: 1rem var(--app-form-spacing);
    gap: 0.5rem;
}

.form-label,
fieldset > legend {
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
}

.form-control,
.form-select,
.input-group-text {
    border-radius: var(--app-form-radius);
    font-size: 1rem;
    line-height: 1.5;
}

.form-control:not(.form-control-sm):not(.form-control-lg),
.form-select:not(.form-select-sm):not(.form-select-lg),
.input-group-text {
    min-height: 2.75rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

textarea.form-control {
    min-height: 6.5rem;
    resize: vertical;
}

.form-text {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.form-check {
    min-height: 1.75rem;
}

:is(.offcanvas-body, .modal-body, .modal-footer) .btn:not(.btn-sm):not(.btn-lg) {
    min-height: 2.75rem;
    padding: 0.625rem 1rem;
    border-radius: var(--app-form-radius);
    font-weight: 600;
}

@media (max-width: 575.98px) {
    :root {
        --app-form-spacing: 1rem;
    }
}
