/*
    Theme Name: Legacy
    Theme URI: https://rxchun.github.io/shop/legacy
    Theme Date: 2021-09-01
    Theme Author: Chun (Gold Developer)
    Theme Author URI: https://rxchun.github.io/shop
    Theme License: Premium
*/

.qa-part-form-profile tr:before {
    display: none;
}

.rquestions a {    
    background-color: transparent !important;
    font: 400 15px/22px Roboto, sans-serif !important;
    color:#000 !important;
}

.rquestions a:hover {    
    color: #1a73e8;
    box-shadow: none !important;
    text-decoration: underline;
}    

.q2am-next-prev-question {
    margin-bottom: 100px;
}

.qa-prev-q {
    float: left;
    padding-left: 20px;
}

.qa-next-q {
    float: right;
    padding-right: 20px;
}

.mfp-bg {
    opacity: 1 !important;
    /*opacity: 0.9 !important;*/
}

@media (max-width: 900px) {
    .qa-sidepanel {
        display: block !important; /* Обеспечиваем видимость на мобильных устройствах */
    }
}

.qa-widget-container .qa-q-item-title a {
    font-weight: 400 !important;
    color: #000 !important;
    font: 400 15px/22px Roboto, sans-serif !important;
}

.qa-a-item-avatar-meta {
    clear: both;
}

.qa-header {
    background-color: #eee !important;
}

.sc-topbar-avatar {
    border-radius: 20px;
}

/*Activity Count*/
.qa-activity-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qa-activity-count-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.qa-activity-count-item:first-child {
    margin-right: 10px;
    border-right: 1px solid #ccc;
    padding-right: 10px;
}

.qa-activity-count-data {
    font-weight: bold;
    font-size: 1.5em;
}

.qa-activity-count-label {
    font-size: 1em;
    color: #666;
    margin-top: 5px;
}

.qa-activity-count-item span + span {
    margin-left: 0;
}
/*Activity Count*/

/* Общий контейнер для избранного и голосования */
.qa-vote-favorite-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 0;
}

/* Стили для контейнера избранного */
.qa-favorite-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* Стили для контейнера голосования */
.qa-voting-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 0;
}

/* Стили для формы внутри контейнера избранного */
.qa-favorite-container form,
.qa-voting-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Стили для звездочки */
.qa-favorite-container .qa-favorite-star {
    font-size: 2.0625rem;
    width: 2.0625rem;
    height: 2.0625rem;
    cursor: pointer;
    color: transparent;
    border-radius: 50%;
    border: 2px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Псевдоэлемент для звезды */
.qa-favorite-container .qa-favorite-star:before {
    content: '★';
    color: transparent;
    width: 100%;
    height: 100%;
    text-align: center;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Стили при наведении на звезду */
.qa-favorite-container .qa-favorite-star:hover {
    color: #ff9900;
    border-color: #ff9900;
}

/* Стили для выбранной звезды */
.qa-favorite-container .qa-favorite-star.selected {
    color: #ff9900;
    border-color: #ff9900;
}

/* Прозрачный фон для псевдоэлементов кнопок */
.qa-voting-button:after, 
.trigger-more-buttons:after, 
.qa-favorite-button:after, 
.qa-unfavorite-button:after {
    background-color: transparent !important;
}

/*Btns*/
#q_doanswer {
    background-color: #e0e0e0;
    color: #1c3041;
    font-weight: 500;
}

button[value="ask related question"] {
    background-color: #e0e0e0;
    color: #1c3041;
    font-weight: 500;
}





/* Container for the entire image block */
.q_img_block {
    margin: 0 auto;
    padding: 12px;
    max-width: 600px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb); /* Light gradient for the overall background */
    border-radius: 10px; /* Rounded corners for the overall container */
    text-align: center;
}

/* Main image in columnmain */
.columnmain img {
    width: 100%; /* Uses the full width of the parent container */
    /*max-width: 400px;  Maximum width limit */
    height: auto; /* Allows image to maintain proportions */
    max-height: 400px; /* Maximum height limit */
    object-fit: contain; /* Maintains image proportions, fits it into the container */
    display: block;
    margin: 0 auto;
    border-radius: 10px; /* Rounded corners for the main image */
}

/* Thumbnail images in column */
.column img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crops the image to fill the container while maintaining proportions */
    aspect-ratio: 1 / 1; /* Sets a square aspect ratio for images */
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.3s ease;
    border-radius: 5px; /* Slightly rounded corners for thumbnails */
}

.column img:hover {
    opacity: 1;
}

/* Image containers */
.subthumb {
    margin: 0 auto;
    width: 80%;
}

.columnmain {
    margin: 0 auto;
    width: 100%;
}

/* Container for thumbnails */
.column {
    float: left;
    width: 20%;
    display: flex;
    justify-content: center; /* Centers content inside the column */
    margin: 30px 25px 5px 0; /* Top margin for thumbnails */
}

/* Clear floats after the columns */
.row:after {
    content: "";
    display: table;
    clear: both;
}

/* Centering thumbnails */
.q_img_block {
    text-align: center;
    margin-top: 10px;
}

/* Media queries for mobile devices */
@media screen and (max-width: 600px) {
    /* Main image */
    .columnmain img {
        max-width: 100%; /* Reduces max width for mobile devices */
        height: auto; /* Maintains image proportions on mobile devices */
        max-height: none; /* Removes max height restriction on mobile */
        object-fit: contain; /* Maintains image proportions, fits it into the container */
    }

    /* Thumbnails */
    .column {
        width: 29%; /* Changes thumbnail width on mobile devices */
        margin: 20px 10px 5px 0; /* Top margin for thumbnails on mobile */
    }

    .column img {
        border-radius: 3px; /* Reduces corner rounding for thumbnails on mobile */
        max-width: 80px; /* Thumbnail width limit on mobile devices */
        height: auto; /* Maintains image proportions */
        object-fit: cover; /* Crops the image while maintaining proportions */
    }

    /* Resize container */
    .q_img_block {
        padding: 10px;
        max-width: 100%;
    }
}

/* 1st main image */
.qa-q-view-extra-content img {
    max-width:100%;
}



/*Gallery*/

/* Контейнер для каждого изображения */
.qa-q-view-extra {
    box-sizing: border-box;
    display: inline-block;
    width: 22%;
    margin: 1%;
    vertical-align: top;
}

/* Квадратный контейнер — исключая .qa-q-view-extra1 */
.qa-q-view-extra:not(.qa-q-view-extra1) .qa-q-view-extra-content {
    position: relative;
    width: 100%;
    padding-top: 100%; /* квадрат */
    overflow: hidden;
    border-radius: 8px;
}

/* Ссылка внутри квадрата — только для маленьких */
.qa-q-view-extra:not(.qa-q-view-extra1) .qa-q-view-extra-content a {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Изображения — только для квадратных */
.qa-q-view-extra:not(.qa-q-view-extra1) .qa-q-view-extra-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    opacity: 0.80;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Наведение — только для маленьких */
.qa-q-view-extra:not(.qa-q-view-extra1) .qa-q-view-extra-content img:hover {
    opacity: 1;
    cursor: pointer;
}

/* Адаптив: планшеты */
@media screen and (max-width: 768px) {
    .qa-q-view-extra {
        width: 29%;
        margin: 10px 1% 5px 1%;
    }
}

/* Адаптив: телефоны */
@media screen and (max-width: 480px) {
    .qa-q-view-extra {
        width: 29%;
        margin: 10px 1% 5px 1%;
    }
}

/* Стили только для .qa-q-view-extra1 — большое изображение */
.qa-q-view-extra1 {
    width: 100%;
    background-color: #ebecef;
    border-radius: 10px;
}

.qa-q-view-extra1 img {
    padding: 12px 12px 6px 12px;
    opacity: 1;
    margin: 0 auto;
    border-radius: 23px;
    width: 100%;
    height: auto;
    object-fit: contain; /* безопасный фолбэк */
}

.qa-q-view-extra1 img:hover {
    transform: scale(1.00);
}
/* Gallery */
