/* ==========================================================================
   SwiftAccordion – ADA/WCAG 2.1 AA Compliant Styles
   ========================================================================== */

.swiftacc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.swiftacc-accordion {
    margin: 0 auto;
    color: #333;
}

/* Group */
.swiftacc-group {
    margin-bottom: 30px;
}

.swiftacc-group h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #222;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Show All button */
.swiftacc-show-all {
    display: inline-block;
    margin-bottom: 15px;
    cursor: pointer;
    color: #0056b3;
    font-size: 0.95em;
    font-weight: 500;
    background: none;
    border: none;
    padding: 4px 2px;
    text-decoration: underline;
    font-family: inherit;
}

.swiftacc-show-all:hover {
    color: #003d80;
}

.swiftacc-show-all:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Item */
.swiftacc-item {
    border: 1px solid #ddd;
    margin-bottom: 8px;
    border-radius: 5px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.swiftacc-item:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Heading wrapper — reset so it doesn't impose h3 sizing */
.swiftacc-heading {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
}

/* Trigger button */
.swiftacc-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    color: #444;
    text-align: left;
    font-family: inherit;
    line-height: 1.4;
    position: relative;
    transition: background-color 0.2s ease;
}

.swiftacc-trigger:hover {
    background-color: #f0f0f0;
}

.swiftacc-trigger:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: -2px;
    background-color: #eef4fb;
    z-index: 1;
}

.swiftacc-trigger:focus {
    outline: 2px solid #0056b3;
    outline-offset: -2px;
}

.swiftacc-trigger:focus:not(:focus-visible) {
    outline: none;
}

.swiftacc-trigger-text {
    flex: 1;
    padding-right: 15px;
}

/* Plus / minus icon */
.swiftacc-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiftacc-icon::before,
.swiftacc-icon::after {
    content: '';
    position: absolute;
    background-color: #555;
    transition: transform 0.2s ease;
}

.swiftacc-icon::before {
    width: 14px;
    height: 2px;
}

.swiftacc-icon::after {
    width: 2px;
    height: 14px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.swiftacc-trigger[aria-expanded="true"] .swiftacc-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

.swiftacc-trigger[aria-expanded="true"] {
    color: #E40D2D;
}

.swiftacc-trigger[aria-expanded="true"] .swiftacc-icon::before,
.swiftacc-trigger[aria-expanded="true"] .swiftacc-icon::after {
    background-color: #E40D2D;
}

/* Content panel */
.swiftacc-panel {
    padding: 15px 20px;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
    border-top: 1px solid #ddd;
}

.swiftacc-panel a {
    color: #0056b3;
    text-decoration: underline;
}

.swiftacc-panel a:hover {
    color: #003d80;
}

.swiftacc-panel a:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Featured mode */
.swiftacc-non-featured[hidden] {
    display: none;
}

.swiftacc-non-featured.swiftacc-revealed {
    display: block;
}

.swiftacc-accordion[data-featured="no"] .swiftacc-show-all {
    display: none;
}

.swiftacc-accordion[data-featured="no"] .swiftacc-non-featured,
.swiftacc-accordion[data-featured="no"] .swiftacc-non-featured[hidden] {
    display: block !important;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .swiftacc-item,
    .swiftacc-trigger,
    .swiftacc-icon::before,
    .swiftacc-icon::after,
    .swiftacc-show-all {
        transition: none;
    }
}

/* ==========================================================================
   High Contrast Mode (Windows)
   ========================================================================== */
@media (forced-colors: active) {
    .swiftacc-trigger:focus-visible {
        outline: 2px solid ButtonText;
    }

    .swiftacc-item {
        border-color: ButtonText;
    }

    .swiftacc-icon::before,
    .swiftacc-icon::after {
        background-color: ButtonText;
    }
}

/* ==========================================================================
   Column Layout
   ========================================================================== */
.swiftacc-columns-1 .swiftacc-items-container {
    display: block;
}

.swiftacc-columns-2 .swiftacc-items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.swiftacc-columns-2 .swiftacc-item {
    flex: 0 0 calc(50% - 15px);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .swiftacc-columns-2 .swiftacc-items-container {
        display: block;
        gap: 0;
    }
}
