/*!
 * AAX Language Pro
 *
 * @package     AAX Language Pro
 * @version     1.0
 * @author      Sérgio Rico
 * @copyright   Copyright (c) 2025, Sérgio Rico (https://opcart.eu)
 * @license     Commercial
 * @link        https://opcart.eu
 * @description Professional OpenCart 4.1 Migration, Localization, and Support Services.
 */
.lang-grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0 !important;
}
#modal-language .modal-body {
    padding: 8px !important;
}
.lang-grid-container:empty {
    display: none;
}
.lang-grid-container:empty + .aax-lang-separator {
    display: none;
}
.aax-lang-separator {
    border-top: 1px solid #dee2e6;
    margin: 8px 0;
}
.featured-grid .aax-lang-btn,
.standard-grid .aax-lang-btn {
    width: calc((100% - 6px) / 2 - 0.5px);
}
@media (min-width: 576px) {
    .featured-grid .aax-lang-btn {
        width: calc((100% - 12px) / 3 - 0.5px);
    }
    .standard-grid .aax-lang-btn {
        width: calc((100% - 18px) / 4 - 0.5px);
    }
}
@media (min-width: 992px) {
    #modal-language .modal-dialog {
        max-width: 650px;
    }
    .lang-grid-container {
        gap: 10px;
    }
    .featured-grid .aax-lang-btn {
        width: calc((100% - 20px) / 3 - 0.5px);
    }
    .standard-grid .aax-lang-btn {
        width: calc((100% - 30px) / 4 - 0.5px);
    }
}
.aax-lang-btn {
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
    overflow: hidden;
    min-width: 0;
    transition: all 0.2s ease-in-out;
    border-radius: 6px;
    padding: 0;
    color: #555;
}
.btn-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 8px;
    box-sizing: border-box;
    width: auto;
}
.aax-lang-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aax-lang-btn .btn-inner {
    font-size: 11px;
    line-height: 1.2;
}
.aax-lang-btn img {
    margin-right: 5px;
    width: 14px;
    height: auto;
    flex-shrink: 0;
}
.aax-lang-btn.featured .btn-inner {
    font-size: 13px;
}
.aax-lang-btn.featured img {
    margin-right: 8px;
    width: 16px;
}
.aax-lang-btn.featured {
    font-weight: 600;
    color: #212529;
}
.aax-lang-btn.standard {
    color: #555;
}
@media (min-width: 992px) {
    .aax-lang-btn .btn-inner {
        font-size: 14px;
        padding: 8px 10px;
    }
    .aax-lang-btn img {
        width: 18px;
        margin-right: 8px;
    }
    .aax-lang-btn.featured .btn-inner {
        font-size: 15px;
        padding: 10px 12px;
    }
    .aax-lang-btn.featured img {
        width: 20px;
        margin-right: 12px;
    }
}
.aax-lang-btn.active {
    border-color: #229ac8;
    background-color: #eaf7ff;
    box-shadow: inset 0 0 0 1px #229ac8;
    cursor: pointer;
    pointer-events: auto;
}
.aax-lang-btn:hover {
    background-color: #f0faff;
    border-color: #229ac8;
    box-shadow: 0 3px 6px rgba(34, 154, 200, 0.15);
    transform: translateY(-1px);
    z-index: 2;
    color: #229ac8 !important;
}
.aax-lang-btn:hover span {
    color: #229ac8 !important;
}
.aax-lang-btn.loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
}
.aax-lang-btn.loading img {
    opacity: 0;
}
.aax-lang-btn.loading::after {
    content: "";
    position: absolute;
    left: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-top-color: #229ac8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@media (max-width: 576px) {
    .aax-lang-btn.standard.loading::after {
        left: 4px;
        width: 14px;
        height: 14px;
    }
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}