/*
 * Custom Accordion Styling - Matches Dark Monk Site Theme
 * Created: 2026-01-08
 * Purpose: Drop-in replacement for jQuery UI Accordion styling
 * Used by: Accordion-JS library
 *
 * Color Reference (from staging site):
 * - Tab background: #544c46 (dark brown-gray)
 * - Active tab text: #faa51a (orange)
 * - Inactive tab text: #ffffff (white)
 * - Panel background: #ffffff (white)
 * - Panel text: #222222 (dark gray)
 * - Border: #000000 (black)
 *
 * NOTE: Using button.ac-trigger for higher specificity to override
 * FormElements.css universal button styles
 */

/* Container */
.accordion-container {
    font-family: Verdana, Arial, sans-serif;
    font-size: 1.1em;
}

/* Individual accordion item */
.accordion-container .ac {
    margin: 0;
    border: 1px solid #000000;
    background: #ffffff;
}

.accordion-container .ac:first-child {
    margin-top: 0;
}

/* Header/Trigger - Default State (inactive/collapsed tabs) */
.accordion-container .ac-header {
    margin: 0;
}

/* Higher specificity selector to override FormElements.css button styles */
.accordion-container button.ac-trigger,
button.ac-trigger {
    display: block;
    width: 100%;
    padding: 0.5em 0.5em 0.5em 2.2em;
    margin: 0;
    border: none;
    border-radius: 0;
    background: #544c46 !important;
    background-color: #544c46 !important;
    color: #ffffff !important;
    font-weight: normal;
    font-size: 100%;
    text-align: left;
    cursor: pointer;
    position: relative;
    font-family: inherit;
}

/* Header - Hover State */
.accordion-container button.ac-trigger:hover,
button.ac-trigger:hover {
    background: #635b54 !important;
    background-color: #635b54 !important;
    color: #faa51a !important;
}

/* Header - Active/Open State */
.accordion-container .ac.is-active button.ac-trigger,
.ac.is-active button.ac-trigger {
    background: #544c46 !important;
    background-color: #544c46 !important;
    color: #faa51a !important;
}

/* Expand/Collapse Icon (triangle arrows) */
.accordion-container button.ac-trigger::before,
button.ac-trigger::before {
    content: '';
    position: absolute;
    left: 0.5em;
    top: 50%;
    margin-top: -4px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 0 4px 6px;
    border-color: transparent transparent transparent #ffffff;
    transition: transform 0.2s ease;
}

.accordion-container .ac.is-active button.ac-trigger::before,
.ac.is-active button.ac-trigger::before {
    transform: rotate(90deg);
    border-left-color: #faa51a;
}

.accordion-container button.ac-trigger:hover::before,
button.ac-trigger:hover::before {
    border-left-color: #faa51a;
}

/* Content Panel */
.accordion-container .ac-panel {
    overflow: hidden;
    transition: height 0.3s ease;
    background: #ffffff;
}

.accordion-container .ac-panel .ac-text {
    padding: 1em 2.2em 16px 2.2em;
    color: #222222;
    overflow: hidden; /* Clearfix for floated children */
}

/* Focus state - remove visible outline */
.accordion-container button.ac-trigger:focus,
button.ac-trigger:focus {
    outline: none;
}

/* Override for checkout accordion specifically - less side padding but keep bottom padding */
#CartAccordion .ac-panel .ac-text {
    padding: 1em 1em 16px 1em;
}
