/**
 * ATTPPF Module - Akira Theme Specific Styling
 *
 * This CSS file provides clean, minimal styling for ATTPPF module
 * that matches Akira theme's design language.
 *
 * Loaded only when Akira theme is active.
 *
 * @version 3.0.23
 * @theme Akira
 */

/* ========================================
   AKIRA THEME - FONT INHERITANCE
   Use theme CSS variables for consistent typography
   ======================================== */

/* Base font inheritance for all ATTPPF elements */
.attppf-root,
.attppf-fo-form {
    font-family: var(--font-family-body, Arial, Helvetica, sans-serif);
}

/* Labels and group titles - use theme label font */
.attppf-fo-form h5,
.attppf-fo-form h6,
.attppf-fo-form label,
.attppf-fo-form .control-label {
    font-family: var(--font-family-label, Arial, Helvetica, sans-serif);
}

/* Section titles - use theme title font */
.attppf-fo-form .fw-bold {
    font-family: var(--font-family-title, Arial, Helvetica, sans-serif);
}

/* ========================================
   AKIRA THEME - GENERAL OVERRIDES
   ======================================== */

/* Container adjustments for cleaner look */
.attppf-root {
    margin-bottom: 1.5rem;
}

.attppf-fo-form {
    padding: 0 !important;
}

/* Remove heavy borders and backgrounds from cards */
.attppf-fo-form .card {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* ========================================
   COLOR GROUP SELECT DROPDOWN
   ======================================== */

/* Main color group selector - minimal style */
#color_group_select.form-select,
.attppf-fo-form #color_group_select {
    background-color: #fff !important;
    border: 1px solid #d6d4d4 !important;
    border-radius: 0 !important;
    color: #232323 !important;
    padding: 10px 40px 10px 15px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    height: auto !important;
    min-height: 44px !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23232323' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 18px !important;
}

#color_group_select.form-select:hover {
    border-color: #232323 !important;
}

#color_group_select.form-select:focus {
    outline: none !important;
    border-color: #232323 !important;
    box-shadow: 0 0 0 2px rgba(35, 35, 35, 0.1) !important;
}

/* ========================================
   CUSTOM COLOR DROPDOWN
   ======================================== */

/* Custom dropdown container */
.custom-dropdown-container {
    position: relative !important;
    margin-bottom: 1rem !important;
}

/* Dropdown header button - clean minimal style */
.custom-dropdown-header.btn {
    background-color: transparent;
    border: 1px solid #d6d4d4 !important;
    border-radius: 0 !important;
    color: #232323;
    padding: 10px 15px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-align: left !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 44px !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.custom-dropdown-header.btn:hover {
    border-color: #232323 !important;
    background-color: transparent;
}

.custom-dropdown-header.btn:focus,
.custom-dropdown-header.btn:active {
    outline: none !important;
    border-color: #232323 !important;
    box-shadow: 0 0 0 2px rgba(35, 35, 35, 0.1) !important;
    background-color: #fff !important;
}

/* When a color is selected, show it with the color background */
.custom-dropdown-header.btn[style*="background-color"] {
    border-color: #232323 !important;
}

/* Dropdown arrow */
.custom-dropdown-arrow {
    font-size: 12px !important;
    margin-left: 10px !important;
    transition: transform 0.2s ease !important;
}

/* Dropdown list container */
.custom-dropdown-list {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: #fff !important;
    border: 1px solid #d6d4d4 !important;
    border-top: none !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    max-height: 350px !important;
    overflow: hidden !important;
    margin-top: -1px !important;
}

/* Dropdown open state - class-based toggle */
.custom-dropdown-list.dropdown-open {
    display: block !important;
}

/* Search input in dropdown */
.custom-dropdown-search.form-control {
    border: none !important;
    border-bottom: 1px solid #e8e8e8 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 12px 15px !important;
    font-size: 14px !important;
    width: 100% !important;
}

.custom-dropdown-search.form-control:focus {
    outline: none !important;
    border-bottom-color: #232323 !important;
    box-shadow: none !important;
}

/* Dropdown options list */
.custom-dropdown-options {
    padding: 0 !important;
    margin: 0 !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    list-style: none !important;
}

/* Individual dropdown option */
.dropdown-option-item {
    padding: 12px 15px !important;
    cursor: pointer !important;
    display: flex;
    align-items: center !important;
    border-bottom: 1px solid #f5f5f5 !important;
    transition: background-color 0.15s ease !important;
    color: #232323 !important;
}

/* Hidden state for filtered dropdown options */
.dropdown-option-item[style*="display: none"] {
    display: none !important;
}

.dropdown-option-item:hover {
    background-color: #f8f8f8 !important;
}

.dropdown-option-item:last-child {
    border-bottom: none !important;
}

/* Color swatch in dropdown */
.dropdown-option-item .option-swatch {
    display: inline-block !important;
    width: 24px !important;
    height: 24px !important;
    margin-right: 12px !important;
    border: 1px solid #d6d4d4 !important;
    border-radius: 2px !important;
    flex-shrink: 0 !important;
}

/* Option text */
.dropdown-option-item .option-text {
    flex: 1 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #232323 !important;
}

/* Price in dropdown */
.dropdown-option-item .attppf-price {
    font-size: 13px !important;
    color: #28a745 !important;
    font-weight: 500 !important;
    margin-left: auto !important;
    padding-left: 10px !important;
}

/* ========================================
   RADIO BUTTONS (COMBO BUTTONS)
   ======================================== */

/* Radio button container */
.combo-btn-with-price {
    background-color: #fff !important;
    border: 1px solid #d6d4d4 !important;
    border-radius: 0 !important;
    color: #232323 !important;
    cursor: pointer !important;
    padding: 10px 15px !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-width: 48px !important;
    position: relative !important;
}

.combo-btn-with-price:hover {
    border-color: #232323 !important;
    background-color: #fff !important;
}

/* Active/selected state */
.combo-btn-with-price.active,
.combo-btn-with-price.selected,
.combo-btn-with-price:has(input[type="radio"]:checked) {
    border-color: #232323 !important;
    background-color: #232323 !important;
    color: #111;
    box-shadow: none !important;
}

.combo-btn-with-price.active .option-text,
.combo-btn-with-price.selected .option-text,
.combo-btn-with-price:has(input[type="radio"]:checked) .option-text {
    color: #111 !important;
}

.combo-btn-with-price.active .attppf-price-below,
.combo-btn-with-price.selected .attppf-price-below,
.combo-btn-with-price:has(input[type="radio"]:checked) .attppf-price-below {
    color: #111 !important;
}

/* Radio button text */
.combo-btn-with-price .option-text {
    font-size: 14px !important;
    font-weight: 400 !important;
    margin-bottom: 4px !important;
    color: #232323 !important;
}

/* Price below radio button */
.combo-btn-with-price .attppf-price-below {
    font-size: 12px !important;
    color: #666 !important;
    font-weight: 400 !important;
    margin-top: 2px !important;
}

/* ========================================
   CHECKBOXES
   ======================================== */

/* Checkbox container */
.checkbox-with-price {
    background-color: #fff !important;
    border: 1px solid #d6d4d4 !important;
    border-radius: 0 !important;
    color: #232323 !important;
    cursor: pointer !important;
    padding: 10px 15px !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    text-align: left !important;
    min-width: 120px !important;
    position: relative !important;
}

.checkbox-with-price:hover {
    border-color: #232323 !important;
    background-color: #fff !important;
}

/* Checked state */
.checkbox-with-price.selected,
.checkbox-with-price:has(input[type="checkbox"]:checked) {
    border-color: #232323 !important;
    background-color: #f8f8f8 !important;
    box-shadow: none !important;
}

/* Checkbox input */
.checkbox-with-price .form-check-input {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    margin: 0 !important;
    width: 18px !important;
    height: 18px !important;
    border: 1px solid #d6d4d4 !important;
    border-radius: 2px !important;
}

.checkbox-with-price .form-check-input:checked {
    background-color: #232323 !important;
    border-color: #232323 !important;
}

/* Checkbox content */
.checkbox-with-price .checkbox-content {
    margin-left: 28px !important;
    display: flex !important;
    flex-direction: column !important;
}

.checkbox-with-price .option-text {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #232323 !important;
    margin-bottom: 2px !important;
}

.checkbox-with-price .attppf-price-below {
    font-size: 12px !important;
    color: #666 !important;
    font-weight: 400 !important;
}

/* ========================================
   SELECT DROPDOWNS
   ======================================== */

/* Standard select dropdown */
.attppf-fo-form select.form-select,
.attppf-fo-form select.selectpicker {
    background-color: #fff !important;
    border: 1px solid #d6d4d4 !important;
    border-radius: 0 !important;
    color: #232323 !important;
    padding: 10px 40px 10px 15px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    height: auto !important;
    min-height: 44px !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23232323' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 18px !important;
}

.attppf-fo-form select.form-select:hover,
.attppf-fo-form select.selectpicker:hover {
    border-color: #232323 !important;
}

.attppf-fo-form select.form-select:focus,
.attppf-fo-form select.selectpicker:focus {
    outline: none !important;
    border-color: #232323 !important;
    box-shadow: 0 0 0 2px rgba(35, 35, 35, 0.1) !important;
}

/* Bootstrap Select overrides */
.bootstrap-select .dropdown-toggle {
    background-color: #fff !important;
    border: 1px solid #d6d4d4 !important;
    border-radius: 0 !important;
    color: #232323 !important;
    padding: 10px 40px 10px 15px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    height: auto !important;
    min-height: 44px !important;
}

.bootstrap-select .dropdown-toggle:hover {
    border-color: #232323 !important;
}

.bootstrap-select .dropdown-toggle:focus {
    outline: none !important;
    border-color: #232323 !important;
    box-shadow: 0 0 0 2px rgba(35, 35, 35, 0.1) !important;
}

/* ========================================
   SECTION HEADERS & LABELS
   ======================================== */

/* Group headers */
.attppf-fo-form h5,
.attppf-fo-form h6 {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #232323 !important;
    margin-bottom: 12px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Labels */
.attppf-fo-form label {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #232323 !important;
    margin-bottom: 8px !important;
}

/* Customization summary label - display selected attributes properly */
.customization-summary {
    white-space: pre-line !important;
    line-height: 1.8 !important;
    font-size: 14px !important;
    margin-bottom: 1rem !important;
    display: block !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    font-weight: 500 !important;
}

/* ========================================
   SPACING & LAYOUT
   ======================================== */

/* Row spacing */
.attppf-fo-form .row.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Column spacing */
.attppf-fo-form .col-12.mb-3 {
    margin-bottom: 1rem !important;
}

/* Gap between options */
.attppf-fo-form .gap-2 {
    gap: 10px !important;
}

/* Flex wrap for options */
.attppf-fo-form .d-flex.flex-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* ========================================
   PDF LINKS
   ======================================== */

/* PDF link styling */
.attppf-fo-form a[href*="pdf"],
.attppf-fo-form a[href*="PDF"] {
    font-size: 13px !important;
    color: #dc3545 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    margin-top: 8px !important;
    transition: color 0.2s ease !important;
}

.attppf-fo-form a[href*="pdf"]:hover,
.attppf-fo-form a[href*="PDF"]:hover {
    color: #c82333 !important;
    text-decoration: underline !important;
}

.attppf-fo-form .material-icons {
    font-size: 16px !important;
    margin-right: 4px !important;
    vertical-align: middle !important;
}

/* ========================================
   INSTRUCTION TEXT
   ======================================== */

.attppf-instruction-text,
.attppf-bottom-instruction-text {
    margin-bottom: 1rem !important;
    padding: 12px 15px !important;
    background-color: #f8f8f8 !important;
    border-bottom: 3px solid #232323 !important;
    border-radius: 0 !important;
}

.attppf-instruction-text div,
.attppf-bottom-instruction-text div {
    color: #232323 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    font-weight: 300 !important;
}

/* ========================================
   HORIZONTAL RULE
   ======================================== */

.attppf-hr {
    border: none !important;
    border-top: 1px solid #e8e8e8 !important;
    margin: 1.5rem 0 !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    /* Adjust padding on mobile */
    .custom-dropdown-header.btn,
    #color_group_select.form-select,
    .attppf-fo-form select.form-select {
        padding: 8px 35px 8px 12px !important;
        min-height: 40px !important;
        font-size: 13px !important;
    }

    /* Stack radio buttons and checkboxes on mobile */
    .combo-btn-with-price,
    .checkbox-with-price {
        min-width: 20% !important;
        margin-bottom: 8px !important;
    }

    /* Adjust dropdown options */
    .dropdown-option-item {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    /* Smaller gap on mobile */
    .attppf-fo-form .gap-2 {
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    /* Further adjustments for very small screens */
    .attppf-fo-form h5,
    .attppf-fo-form h6 {
        font-size: 13px !important;
    }

    /* Color dropdown - use viewport height for better mobile experience */
    .custom-dropdown-list {
        max-height: 60vh !important;
    }
    
    /* Also increase options list height */
    .custom-dropdown-options {
        max-height: calc(60vh - 50px) !important;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus visible for keyboard navigation */
.custom-dropdown-header.btn:focus-visible,
#color_group_select:focus-visible,
.combo-btn-with-price:focus-visible,
.checkbox-with-price:focus-visible,
select:focus-visible {
    outline: 2px solid #232323 !important;
    outline-offset: 2px !important;
}

/* Ensure sufficient contrast */
.attppf-fo-form * {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .custom-dropdown-list {
        display: none !important;
    }

    .attppf-fo-form {
        border: 1px solid #000 !important;
        padding: 10px !important;
    }
}

/* End of Akira Theme Specific Styles */

