/* Aircheck Library Styles */

/* Search Container Styles - Material Design */
.aircheck-search-container,
#aircheck-search {
    background-color: #ffffff;
    padding: 24px;
    margin-bottom: 32px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-row {
    display: flex;
    gap: 0;
    align-items: stretch;
    margin-bottom: 24px;
}

/* Consolidated search input styles */
#aircheck-search-input {
    width: 431px;
    height: 47px;
    padding: 0px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 50px 0px 0px 50px;
    font-size: 16px;
    background: #ffffff;
    outline: none;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

#aircheck-search-input:focus {
    border-color: #AC2125;
    box-shadow: 0 0 0 2px rgba(172, 33, 37, 0.1);
}

#aircheck-filter {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-right: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: all 0.2s ease;
    background: #fafafa;
}

#aircheck-filter:focus {
    border-color: #AC2125;
    background: #ffffff;
}

.search-button {
    background: #AC2125;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 0px 50px 50px 0px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    transition: background 0.2s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-button:hover {
    background: #8A1B1E;
}

.search-button:active {
    background: #761618;
}

/* Advanced Filters - Material Design */
.advanced-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 0;
}

.filter-group.full-width {
    flex: 1 1 100%;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

/* Material Design Select */
.filter-option,
.material-select {
    width: 100%;
    padding: 12px 36px 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fafafa;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 24px;
}

.filter-option:hover,
.material-select:hover {
    border-color: #bdbdbd;
    background-color: #f5f5f5;
}

.filter-option:focus,
.material-select:focus {
    outline: none;
    border-color: #AC2125;
    background-color: #ffffff;
}

#clear-filters {
    margin-top: 25px;
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#clear-filters:hover {
    background-color: #c0392b;
}

/* Aircheck List Styles */
#aircheck-list {
    margin-top: 30px;
}

.mp3-track {
    display: block;
    padding: 15px 20px;
    margin-bottom: 10px;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mp3-track:hover {
    background-color: #f0f8ff;
    border-color: #0073aa;
    transform: translateX(5px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.mp3-track:before {
    content: "🎵";
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    transition: left 0.3s ease;
}

.mp3-track:hover:before {
    left: 10px;
}

/* Category Headers */
.aircheck-category {
    margin-top: 40px;
    margin-bottom: 20px;
}

.aircheck-category h3 {
    font-size: 24px;
    color: #333;
    border-bottom: 3px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Highlight Search Terms */
mark {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
}

/* No Results Message */
#no-results {
    font-size: 18px;
    color: #666;
    padding: 40px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #aircheck-search {
        padding: 16px;
    }
    
    .search-row {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 16px;
    }
    
    #aircheck-filter {
        border-radius: 4px;
        border-right: 1px solid #e0e0e0;
    }
    
    .search-button {
        border-radius: 4px;
        width: 100%;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group.full-width {
        width: 100%;
    }
    
    .mp3-track, .aircheck-item {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    #aircheck-search-input {
        width: 100%;
        max-width: 450px;
        height: 42px;
        padding: 10px 135px 10px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    #aircheck-filter {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 16px;
    }
    
    .audio-control-btn,
    .circular-btn {
        width: 45px;
        height: 45px;
    }
    
    .audio-control-btn img,
    .circular-btn img {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .usarm-audio-controls {
        padding: 12px 16px;
    }
    
    .usarm-audio-controls .aircheck-title-display {
        font-size: 14px;
    }
    
    #aircheck-search-input {
        max-width: 320px;
        height: 38px;
        padding: 8px 115px 8px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
        border-radius: 19px;
    }
}

/* Audio Player Integration */
.aircheck-player {
    margin-top: 15px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.aircheck-player audio {
    width: 100%;
}

/* Metadata Display */
.aircheck-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.aircheck-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.aircheck-meta span:before {
    content: "•";
    color: #999;
}

.aircheck-meta span:first-child:before {
    display: none;
}

/* Aircheck Item Container */
.aircheck-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    margin-bottom: 10px;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.aircheck-item:hover {
    background-color: #f0f8ff;
    border-color: #0073aa;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Audio Controls */
.usarm-audio-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    margin-bottom: 10px;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.audio-control-btn {
    width: 45px;
    height: 45px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.audio-control-btn:hover {
    transform: scale(1.1);
}

.audio-control-btn:active {
    transform: scale(0.95);
}

.audio-control-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Legacy support for circular-btn */
.circular-btn {
    width: 45px;
    height: 45px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
    padding: 0;
}

.circular-btn:hover {
    opacity: 0.7;
}

.circular-btn img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

/* Title Display */
.usarm-audio-controls .aircheck-title-display {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
}

.usarm-audio-controls .aircheck-title-display a {
    display: block;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.usarm-audio-controls .aircheck-title-display a:hover {
    color: #AC2125;
}