/* Greenhouse Job Board Styles */
.beale-greenhouse-job-board {
    max-width: 100%;
    margin: 0 auto;
    font-family: inherit;
    margin-top:50px;
}

.beale-greenhouse-job-board h2{

}

/* Remove old filters section */
.bgjb-filters {
    display: none;
}

/* Table Layout with Header Filters */
.bgjb-table-header {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 40px 0;
    font-weight: 700;
    color: #342C4B;
    font-size: 20px;
    align-items: center;
    margin-top:90px;
}

.bgjb-table-header:before, .bgjb-table-header:after{
    content:'';
    display:block;
    width:100%;
    height:0.5px;
    background:#342C4B;
    position:absolute;
    left:0;
}

.bgjb-table-header:before{
    top:0;
}

.bgjb-table-header:after{
    bottom:0;
}

.bgjb-table-header .bgjb-col-job-title span {
    
}

/* Bootstrap Dropdown Styling */
.bgjb-filter-dropdown {
    width: 100%;
    text-align: left !important;
    background: white !important;
    border: none !important;
    color: #342C4B !important;
    font-weight: 700;
    font-size: 20px !important;
    padding: 8px 30px 8px 0; /* Extra right padding for chevron */
    position: relative;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Remove any Bootstrap button styling */
.btn.bgjb-filter-dropdown {
    background: white !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-left:0;
}

.btn.bgjb-filter-dropdown:hover,
.btn.bgjb-filter-dropdown:focus,
.btn.bgjb-filter-dropdown:active {
    background: white !important;
    border: none !important;
    box-shadow: none !important;
    color: #342C4B !important;
    border-radius: 0 !important;
    text-align: left !important;
}

/* Remove Bootstrap's default dropdown arrow - More specific selectors */

/* Add custom SVG chevron */
.bgjb-filter-dropdown::after {
    content: '';
    position: relative;
    top: 50%;
    width: 8px;
    height: 5px;
    background-image: url('../images/down-chevron.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.2s ease;
    margin-left:5px;

}

/* Ensure filter text is left aligned */
.bgjb-filter-dropdown .filter-text {
    text-align: left !important;
    display: block;
    font-weight: 700;
}

/* Active filter state chevron */
.bgjb-filter-dropdown.has-filter::before {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(45%) sepia(82%) saturate(1352%) hue-rotate(87deg) brightness(94%) contrast(101%);
}

/* Rotate chevron when dropdown is open */
.bgjb-filter-dropdown.show::after {
    transform: translateY(-50%) rotate(180deg);
}


/* Dropdown Menu Styling - GREEN BACKGROUND WHEN OPEN */
.bgjb-dropdown-menu {
    min-width: 100%;
    background-color: #BCF100 !important;
    border: 0 none !important;
    border-radius: 0 !important;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 8px !important; /* More gap from trigger */
    left: 0 !important; /* Force left alignment */
    right: auto !important;
    transform: none !important;
    top: 100% !important;
}

.bgjb-dropdown-menu .dropdown-item {
    padding: 8px 12px;
    font-size: 15px;
    color: #342C4B;
    transition: all 0.2s ease;
}

.bgjb-dropdown-menu .dropdown-item:hover,
.bgjb-dropdown-menu .dropdown-item:focus {
    color: #342C4B;
    text-decoration: underline;
    background:transparent;
}

.bgjb-dropdown-menu .dropdown-item.active {
    color: #342C4B;
    text-decoration: underline;
    background-color: transparent !important; /* Override Bootstrap default blue */
}

/* Active filter styling */
.bgjb-filter-dropdown.has-filter {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Jobs Container */
.bgjb-jobs-container {
    display: block;
}

.bgjb-job-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 40px 0;
    align-items: center;
    transition: background-color 0.2s ease;
    position: relative;
}

.bgjb-job-row:after{
    content: '';
    display: block;
    width: 100%;
    height: 0.5px;
    background: #342C4B;
    position: absolute;
    left: 0;
    bottom: 0;
}

/* Column Styles */
.bgjb-col-job-title a {
    text-decoration: none;
    color:#000;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 300;
}

.bgjb-col-job-title a:hover {
    text-decoration: underline;
}

.bgjb-col-location,
.bgjb-col-team,
.bgjb-col-function {
    font-size: 20px;
    font-weight: 300;
}

/* Function column styling */
.bgjb-col-function {
    text-transform: capitalize;
}

/* No Results */
.bgjb-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    border-top: 1px solid #f0f0f0;
}

/* Error Messages */
.bgjb-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 4px solid #f44336;
    margin: 20px 0;
}

.bgjb-no-jobs {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .beale-greenhouse-job-board{
        margin-top:0;
    }

    .bgjb-table-header {
        display:block; /* Hide header on mobile */
        margin-top:70px;
    }

    .bgjb-table-header .bgjb-col-job-title{
        display: none;;
    }
    
    .bgjb-job-row {
        grid-template-columns: 1fr;
        gap: 8px;
        border-bottom: 1px solid #e1e1e1;
    }
    
    .bgjb-job-row:before {
        content: '';
        display: block;
        width: 100%;
        height: 1px;
        background: #f0f0f0;
        margin-bottom: 15px;
    }
    
    .bgjb-job-row:first-child:before {
        display: none;
    }
    
    .bgjb-col-job-title {
        order: -1;
    }
    
    .bgjb-col-job-title a {
        font-weight: 600;
    }
    
    /* Mobile filters - show as regular dropdowns */
    .bgjb-filters {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .bgjb-mobile-filter {
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 16px;
        background: white;
        width: 100%;
    }
}

@media (max-width: 480px) {
    
}

/* Loading States */
.bgjb-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.bgjb-loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    animation: gjb-spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes gjb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.bgjb-filter-dropdown:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bgjb-job-row {
        border-bottom: 2px solid #000;
    }
    
    .bgjb-table-header {
        border-bottom: 2px solid #000;
    }
    
    .bgjb-filter-dropdown {
        border: 2px solid #000 !important;
        border-radius: 0 !important;
    }
}
