/* Aizyne AI Tool Database Light Fix v1
   Fixes dark filter/search area and unstyled controls on ai-tool-database.php.
*/

body{
    background:
        radial-gradient(circle at 8% 0%, rgba(0,101,189,.13), transparent 28rem),
        radial-gradient(circle at 96% 6%, rgba(111,95,168,.09), transparent 26rem),
        linear-gradient(180deg,#FFFFFF 0%,#F6F9FC 50%,#EDF5FB 100%)!important;
    color:#142236!important;
}

/* Main page shell */
main,
.wrap,
.container,
.tool-database,
.scorecard-database,
.scorecards-page,
.scorecard-page,
.ai-tool-database,
.page-wrap{
    background:transparent!important;
    color:#142236!important;
}

/* Hero already looks mostly good, keep it consistent */
.hero,
.page-hero,
.database-hero,
.scorecard-hero,
.ai-tool-hero{
    background:
        linear-gradient(135deg,rgba(0,101,189,.10),rgba(255,255,255,.96) 56%,rgba(111,95,168,.07)),
        #FFFFFF!important;
    border:1px solid #D8E5F0!important;
    border-radius:24px!important;
    box-shadow:0 16px 38px rgba(6,43,74,.10)!important;
    color:#142236!important;
}

/* The dark filter/search block from the screenshot */
form,
.search-form,
.filter-form,
.filters,
.filter-panel,
.search-panel,
.database-search,
.scorecard-search,
.scorecard-filters,
.tool-filters,
.search-box,
.filter-box{
    background:#FFFFFF!important;
    background-color:#FFFFFF!important;
    color:#142236!important;
    border:1px solid #D8E5F0!important;
    border-radius:20px!important;
    box-shadow:0 10px 28px rgba(6,43,74,.09)!important;
}

/* Avoid turning tiny inline forms into big panels */
td form,
.azw-actions form,
form[style*="display:inline"]{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    padding:0!important;
    border-radius:0!important;
}

/* If the filter form itself has inner grid, give it breathing space */
.search-form,
.filter-form,
.filters,
.filter-panel,
.search-panel,
.database-search,
.scorecard-search,
.scorecard-filters,
.tool-filters{
    padding:1rem!important;
    margin:1rem 0!important;
}

/* Labels in filter panel */
form label,
.search-form label,
.filter-form label,
.filters label,
.filter-panel label,
.search-panel label,
.database-search label,
.scorecard-search label,
.scorecard-filters label,
.tool-filters label{
    color:#062B4A!important;
    font-weight:850!important;
}

/* Inputs/selects */
form input[type="text"],
form input[type="search"],
form select,
.search-form input,
.search-form select,
.filter-form input,
.filter-form select,
.filters input,
.filters select,
.filter-panel input,
.filter-panel select,
.search-panel input,
.search-panel select,
.database-search input,
.database-search select,
.scorecard-search input,
.scorecard-search select,
.scorecard-filters input,
.scorecard-filters select,
.tool-filters input,
.tool-filters select{
    background:#FFFFFF!important;
    color:#142236!important;
    border:1px solid #C7D8E8!important;
    border-radius:12px!important;
    min-height:44px!important;
    padding:.72rem .85rem!important;
    box-shadow:inset 0 1px 0 rgba(6,43,74,.03)!important;
}

form input:focus,
form select:focus{
    outline:3px solid rgba(0,101,189,.18)!important;
    border-color:#0065BD!important;
}

/* Search and reset controls */
.az-tool-db-submit,
form button[type="submit"],
form input[type="submit"],
.search-form button,
.filter-form button,
.filters button,
.scorecard-filters button,
.tool-filters button{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:42px!important;
    padding:.68rem 1rem!important;
    border-radius:12px!important;
    border:0!important;
    background:linear-gradient(135deg,#0065BD,#062B4A)!important;
    color:#FFFFFF!important;
    text-decoration:none!important;
    font-weight:850!important;
    box-shadow:0 12px 26px rgba(0,101,189,.20)!important;
    cursor:pointer!important;
    appearance:none!important;
    -webkit-appearance:none!important;
}

.az-tool-db-submit:hover,
form button[type="submit"]:hover,
form input[type="submit"]:hover{
    transform:translateY(-1px);
    box-shadow:0 16px 32px rgba(0,101,189,.25)!important;
}

.az-tool-db-reset,
a[href*="ai-tool-database.php"]:not(.az-nav-link):not(.az-brand):not(.az-mega-item):not(.az-mobile-cta){
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:42px!important;
    padding:.68rem 1rem!important;
    border-radius:12px!important;
    background:#FFFFFF!important;
    border:1px solid #C7D8E8!important;
    color:#062B4A!important;
    text-decoration:none!important;
    font-weight:850!important;
    box-shadow:0 8px 18px rgba(6,43,74,.08)!important;
}

/* Cards / results */
.card,
.tool-card,
.scorecard-card,
.database-card,
.result-card,
.ai-tool-card,
.grid > article,
.results-grid > article{
    background:#FFFFFF!important;
    color:#142236!important;
    border:1px solid #D8E5F0!important;
    border-radius:18px!important;
    box-shadow:0 8px 22px rgba(6,43,74,.08)!important;
}

.card h2,
.card h3,
.tool-card h2,
.tool-card h3,
.scorecard-card h2,
.scorecard-card h3,
.database-card h2,
.database-card h3,
.result-card h2,
.result-card h3,
.ai-tool-card h2,
.ai-tool-card h3{
    color:#062B4A!important;
}

.card p,
.tool-card p,
.scorecard-card p,
.database-card p,
.result-card p,
.ai-tool-card p,
.card span,
.tool-card span,
.scorecard-card span,
.database-card span,
.result-card span,
.ai-tool-card span{
    color:#5B6F84!important;
}

/* Scorecard card action */
.az-tool-db-scorecard-link,
a[href*="ai-tool-scorecard.php"],
.card a[href*="scorecard"],
.tool-card a[href*="scorecard"],
.scorecard-card a[href*="scorecard"]{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:40px!important;
    margin-top:.55rem!important;
    padding:.62rem .9rem!important;
    border-radius:12px!important;
    background:#FFFFFF!important;
    border:1px solid #C7D8E8!important;
    color:#062B4A!important;
    text-decoration:none!important;
    font-weight:850!important;
    box-shadow:0 8px 18px rgba(6,43,74,.08)!important;
}

.az-tool-db-scorecard-link:hover,
a[href*="ai-tool-scorecard.php"]:hover,
.card a[href*="scorecard"]:hover{
    background:#EAF5FF!important;
    border-color:#0065BD!important;
}

/* Risk/rating pills */
.badge,
.pill,
.tag,
.rating,
.risk,
.risk-pill,
.score-pill,
.status-pill{
    border-radius:999px!important;
    font-weight:850!important;
}

/* Specific orange/green labels should remain visible */
.low,
.low-medium,
.medium,
.caution,
.high,
.suitable,
.controls{
    text-shadow:none!important;
}

/* Make any remaining dark blocks light */
.dark,
.dark-card,
.dark-panel,
.black,
.panel-dark{
    background:#FFFFFF!important;
    color:#142236!important;
    border:1px solid #D8E5F0!important;
}

/* Grid spacing */
.grid,
.results-grid,
.scorecards-grid,
.tools-grid{
    gap:1rem!important;
}

@media(max-width:760px){
    .search-form,
    .filter-form,
    .filters,
    .filter-panel,
    .search-panel,
    .database-search,
    .scorecard-search,
    .scorecard-filters,
    .tool-filters{
        padding:.9rem!important;
        border-radius:16px!important;
    }

    .az-tool-db-submit,
    .az-tool-db-reset,
    form button[type="submit"],
    form input[type="submit"]{
        width:100%!important;
        margin-top:.35rem!important;
    }
}
