/* Екатерининское гадание на 40 карточках */
.mgc-ekaterina {
    max-width: 550px;
    margin: 20px auto;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-family: 'EB Garamond', 'Georgia', serif;
}



/* Веер из 40 карточек: до вопроса скрыт */
.mgcek-wrap {
    display: none;
}

@media (min-width: 470px) {
  .mgcek-wrap {
    height: 260px;
    position: relative;
} 
}
@media (max-width: 469px) and (min-width: 376px) {  /* для разрешения экрана от 470 до 930 пикселей */
    .mgcek-wrap {
    height: 140px;
    position: relative;
}
}
@media (max-width: 376px) {
  .mgcek-wrap {
    height: 170px;
    position: relative;
}
}

.mgcek-back {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: url('../img/ekaterina/back.webp');
    background-size: cover;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .mgcek-back:hover {
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
        transform: translate(0, -10%);
        border: 1px solid #000;
    }
}

.mgcek-result-card {
    display: flex;
    border: none;
    padding: 10px;
    justify-content: space-around;
}

.mgcek-result-card>div {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 125px;
    height: 125px;
    border: 1px solid #6b6b6b;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover эффект для выпавших карт только на десктопах */
@media (hover: hover) and (pointer: fine) {
    .mgcek-result-card>div:hover {
        transform: scale(1.1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        z-index: 10;
        position: relative;
    }
}

div.mgcek-result-card__num {
    font-size: 30px;
}

.mgcek-text {
    padding: 0px 0;
}

.mgcek-text__head {
    display: none;   /* «Выберите 3 карточки:» — после вопроса */
    font-weight: 600;
    font-size: 20px;
    text-align: center;
    margin: 10px 0;
}

.mgcek-card__flip {
    display: none;
    background-color: transparent;
    width: 130px;
    height: 130px;
    border: 1px solid #f1f1f1;
    perspective: 1000px;
}

.mgcek-card__inner {
    position: relative;
    width: 130px;
    height: 130px;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.mgcek-card__innert {
    transform: rotateY(180deg);
}

.mgcek-card__back,
.mgcek-card__front {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.mgcek-card__back {
    background-size: cover;
    transform: rotateY(180deg);
}

.mgcek-card__front {
    background-image: url('../img/ekaterina/back.webp');
    background-size: cover;
}

.mgcek-text__result {
    display: none;
}

/* Части результата — скрыты, пока до них не дошло */
.mgcek-user-question-display {
    display: none;
    text-align: center;
    margin-bottom: 5px;
}

.mgcek-loading {
    display: none;
    text-align: center;
}

.mgcek-webhook-result {
    display: none;
}

/* Результат — поверх улетающих карточек */
.mgcek-text__result.show-result {
    position: relative;
    z-index: 100;
}

.mgcek-text__result>div {
    padding: 5px 0px;
}

/* «Ваш вопрос» и «Ваш результат гадания» — подписи прописными с разрядкой цветом линии поля
   (выбор владельца «В» по екатерининское-вопрос-варианты.html) */
.mgcek-text__result .mgcek-user-question-display {
    max-width: 480px;
    margin: 10px auto 4px;
    padding: 0 10px;
}

.mgcek-q-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8b7355;
}

.mgcek-q-text {
    display: block;
    margin-top: 4px;
    font-size: 20px;
    font-style: italic;
}

/* Заголовок — прямо в линии над ответом (вместо верхней виньетки) */
.mgcek-text__result .mgcek-text__result-head {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 420px;
    margin: 18px auto 0;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8b7355;
    white-space: nowrap;
}

.mgcek-text__result-head::before,
.mgcek-text__result-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #c9b99a;
}

.mgcek-btnreload {
    display: none;
    text-align: center;
    margin: 20px 0;
}

/* Кнопка */
.mgc-btn-2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 235px;
    height: 65px;
    margin: 10px auto 0;
    background-color: #f1e7d4;
    background-image: url('/wp-content/themes/gadanie-online/assets/images/knopka.webp');
    background-size: cover;
    background-position: center;
    color: #4a3828;
    font-size: 17px;
    font-weight: 400;
    font-family: 'EB Garamond', 'Georgia', serif;
    border: none;
    border-radius: 0;
    padding: 0 0 4px 0;
    outline: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Кнопки — настоящие button (были div): высота строки — как у текста гадания, а не у кнопки */
.mgc-ekaterina .mgc-btn-2 {
    line-height: inherit;
}

.mgc-btn-2:hover {
    transform: translateY(-2px);
}

.mgc-btn-2:active,
.mgc-btn-2.mgc-btn-2--active {
    background-image: url('/wp-content/themes/gadanie-online/assets/images/knopka-1.webp');
    transform: translateY(2px);
}

/* Стили для блока с вопросом */
.mgcek-question-block {
    text-align: center;
    margin: 20px 0;
}

/* Поле — общее классическое (assets/common/css/rg-question.css) */
.mgcek-question-input {
    margin: 15px 0;
}

.mgc-ekaterina .rg-question {
    max-width: 400px;
}

.mgcek-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.mgcek-question-btn {
    margin-top: 15px;
}

/* Лимит исчерпан — вместо поля и кнопки одна фраза */
.mgcek-limit {
    display: none;
    font-size: 20px;
    font-style: italic;
    line-height: 1.4;
    color: #4a3828;
}

.mgcek-question-block.mgcek-limited .mgcek-question-input,
.mgcek-question-block.mgcek-limited .mgcek-question-btn {
    display: none;
}

.mgcek-question-block.mgcek-limited .mgcek-limit {
    display: block;
}

@media (max-width: 600px) {
    .mgcek-wrap {
        margin-bottom: 40px;
    }
}

@media only screen and (min-width: 341px) and (max-width: 600px) {
    .mgcek-result-card {
        padding: 0;
    }
    .mgcek-result-card>div, .mgcek-card__flip, .mgcek-card__inner {
        width: 100px;
        height: 100px;
    }
}

@media only screen and (max-width: 340px) {
    .mgcek-result-card {
        padding: 0;
    }
    .mgcek-result-card>div, .mgcek-card__flip, .mgcek-card__inner {
        width: 90px;
        height: 90px;
    }
}

/* Ответ — «Виньетки» (выбор владельца по екатерининское-варианты.html): курсив 20 px по центру,
   строки не шире 480 px; сверху — заголовок в линии, снизу — тонкая линия с ромбиком */
.mgcek-answer {
	max-width: 480px;
	margin: 0 auto;
	padding: 6px 10px;
	font-family: 'EB Garamond', 'Georgia', serif;
	font-size: 20px;
	font-style: italic;
	line-height: 1.4;
	color: #4a3828;
	text-align: center;
	white-space: pre-line; /* абзацы ответа */
}

.mgcek-answer::after {
	content: '';
	display: block;
	width: 220px;
	height: 14px;
	margin: 6px auto;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 14'%3E%3Cpath d='M4 7 H96 M124 7 H216' stroke='%23c9b99a' stroke-width='1'/%3E%3Cpath d='M110 2 L115 7 L110 12 L105 7 Z' fill='%23c9b99a'/%3E%3Ccircle cx='100' cy='7' r='1.6' fill='%23c9b99a'/%3E%3Ccircle cx='120' cy='7' r='1.6' fill='%23c9b99a'/%3E%3C/svg%3E") center / 220px 14px no-repeat;
}

/* Ожидание ответа: три серые точки (как в других гаданиях) */
.mgcek-loading {
    color: #666;
}

@keyframes mgcek-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.mgcek-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 auto 15px;
}

.mgcek-dots > div {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #999999;
    animation: mgcek-bounce 1.4s infinite ease-in-out both;
}

.mgcek-dots .one {
    animation-delay: -0.32s;
}

.mgcek-dots .two {
    animation-delay: -0.16s;
}
