/* 
 * Skip to main content link (Accessibility WCAG 2.1.1)
 */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 2px solid #000;
    color: #000;
    text-decoration: none;
    font-weight: bold;
}

.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
    position: absolute;
    outline: 2px solid #0d6efd; /* WCAG 2.4.7 visible focus ring */
    outline-offset: 2px;
    background: #fff;
    color: #000;
    padding: 0.5rem 1rem;
    z-index: 10000;
}


/**
 * Permitium custom theme.
 * Referenced in multiple layout files.
 */

/* 
 * Legacy scaling: mimic Bootstrap 2.x/3.x compact look in Bootstrap 5 
 */
html, body {
    font-size: 14px; 
}

.btn {
    padding: 0.25rem 0.5rem;
    font-size: 14px;
}

.form-control-sm, .btn-sm {
    padding: 0.15rem 0.4rem;
    font-size: 13px;
}

.table td, .table th {
    padding: 0.4rem 0.5rem !important; 
}

.nav-tabs .nav-link {
    padding: 0.4rem 0.8rem;
}

.card-header, .card-body, .modal-header, .modal-body, .modal-footer {
    padding: 0.5rem 0.75rem;
}

.col-form-label {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    margin-bottom: 0;
    line-height: 1.3;
}

label.control-label {
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: normal; 
}

.row {
    --bs-gutter-x: 1.5rem; 
}

.mb-1, .my-1 { margin-bottom: 0.25rem !important; }
.mb-2, .my-2 { margin-bottom: 0.5rem !important; }
.mb-3, .my-3 { margin-bottom: 0.75rem !important; }
.mt-1, .py-1 { margin-top: 0.25rem !important; }

.control-group {
    margin-bottom: 0px !important;
}

.form-check {
    margin-bottom: 0px;
    min-height: auto;
}

[class^="icon-"], [class*=" icon-"] {
    transform: scale(0.85);
    vertical-align: middle;
}

[role="search"] .form-control-sm,
[role="search"] .form-select-sm,
[role="search"] .btn-group-sm > .btn {
    padding: 0.25rem 0.6rem !important;
    font-size: 14px !important;
    min-height: auto;
}

[role="search"] .row.g-1 {
    --bs-gutter-x: 0.25rem;
}

.btn-group-vertical > .btn {
    padding: 0.2rem 0.5rem;
    font-size: 13px;
}

.navbar-brand img {
    height: 27px !important; 
}

.navbar-nav .nav-link {
    font-size: 13.5px;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.2rem !important;
}

h4 {
    font-size: 1.4rem;
    font-weight: 600;
}
/* Specific subnav reduction */
.subnav .nav-tabs {
    padding: 0.2rem 0.4rem !important;
}

/* Overall container and row tightening - Relaxed */
.p-2 {
    padding: 0.4rem !important;
}

.mt-5 {
    margin-top: 2rem !important; 
}

/* WCAG 2.4.7 Focus Visible: ensure bootstrap-select has visible focus (PER-6522) */
.bootstrap-select .dropdown-toggle:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}
.bootstrap-select .dropdown-menu .inner li a:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* WCAG 2.1 Level AA - 1.4.11 Non-text Contrast */
input:not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), 
select, 
textarea, 
.form-control {
    border: 1px solid #767676 !important; /* Ensures at least 3:1 ratio against white background for input borders */
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible,
.close:focus-visible {
    outline: 3px solid #005fcc !important; /* Non-text contrast ratio passes well over 3:1 against white/grey/black */
    outline-offset: 2px !important;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
.close:focus:not(:focus-visible) {
    outline: none !important;
}

.add-on i, 
.icon-envelope, 
.icon-calendar, 
[class^="icon-"], 
[class*=" icon-"] {
    color: #444444 !important; /* Ensures icons have adequate contrast */
}



/* Match gunpermit exact brand colors via root */
:root {
	--bs-red:#c92a2a !important;
	--bs-cyan:#49afcd !important;
	--bs-yellow:#faa732 !important;
	--bs-green:#2e7d32 !important;
	--bs-blue:#005cbf !important;
	--bs-green-hover:#1b5e20 !important;
	--bs-info:#49afcd !important;
	--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)) !important;
}



/* Match gunpermit gradient button styles */
.btn {
	background-image: var(--bs-gradient);
}
.btn-primary {
	--bs-btn-color:#fff;
	background-image: var(--bs-gradient);
	--bs-btn-hover-color:#fff;
	--bs-btn-border-color: var(--bs-blue);
	background-color: var(--bs-blue);
}
.btn-warning {
	--bs-btn-color:#fff;
	background-image: var(--bs-gradient);
	--bs-btn-hover-color:#fff;
	background-color: var(--bs-yellow);
	--bs-btn-border-color: var(--bs-yellow);
	--bs-btn-hover-bg:#f89406;
	--bs-btn-hover-border-color:#f89406;
	--bs-btn-active-color:#fff;
	--bs-btn-active-bg:#f89406;
	--bs-btn-active-border-color:#f89406;
}
.btn-info{
	--bs-btn-color:#fff;
	background-image: var(--bs-gradient);
	--bs-btn-hover-color:#fff;
	background-color: var(--bs-info);
	--bs-btn-border-color: var(--bs-info);
	--bs-btn-hover-bg:#0a9fbd;
	--bs-btn-hover-border-color:#0a9fbd;
	--bs-btn-active-color:#fff;
	--bs-btn-active-bg:#0a9fbd;
	--bs-btn-active-border-color:#0a9fbd;
}
.btn-success{
	--bs-btn-hover-border-color: var(--bs-green-hover) !important;
	--bs-btn-color:#fff;
	background-image: var(--bs-gradient);
	background-color: var(--bs-green);
	--bs-btn-hover-color:#fff;
	--bs-btn-border-color: var(--bs-green);
	--bs-btn-hover-bg:var(--bs-green-hover);
}
.btn-danger{
	--bs-btn-color:#fff;
	background-image: var(--bs-gradient);
	--bs-btn-hover-color:#fff;
	--bs-btn-border-color: var(--bs-red);
	background-color: var(--bs-red);
}
.btn-secondary{
	--bs-btn-color:#fff;
	background-image: var(--bs-gradient);
	--bs-btn-hover-color:#fff;
	background-color: #5a6268;
	border-color: #545b62;
}

/* Base text-bg to match gunpermit exactly if used */
.text-bg-info{ background-color: var(--bs-info) !important; background-image: var(--bs-gradient) !important; color: #fff !important }
.text-bg-primary{ background-color: var(--bs-blue) !important; background-image: var(--bs-gradient) !important; color: #fff !important }
.text-bg-warning{ background-color: var(--bs-yellow) !important; background-image: var(--bs-gradient) !important; color: #fff !important }
.text-bg-success{ background-color: var(--bs-green) !important; background-image: var(--bs-gradient) !important; color: #fff !important }
.text-bg-danger{ background-color: var(--bs-red) !important; background-image: var(--bs-gradient) !important; color: #fff !important }

