
/* ===== LAYOUT ===== */
.tarot-layout{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:90px;
}

/* ===== CARD BACK ===== */
.card-back{
  position:relative;
  width:220px;
  cursor:pointer;
  transition:transform .4s ease, box-shadow .4s ease;
}

.card-back:hover{
  transform:translateY(-6px) scale(1.03);
  box-shadow:0 20px 50px rgba(0,0,0,.3);
}

.card-back img{
  width:100%;
  display:block;
}

/* ===== LOADER ===== */
.loader{
  position:absolute;
  top:50%;
  left:50%;
  max-width:200px;
  transform:translate(-50%,-50%);
  transition:transform 2.2s linear;
  pointer-events:none;
}

.card-back.spin .loader{
  transform:translate(-50%,-50%) rotate(720deg);
}

/* ===== RESULT ===== */
.result{
  max-width:440px;
  text-align:left;
  animation:fadeUp .6s ease forwards;
}

.hidden{
  display:none;
}

/* card image */
img.drawn{
  width:250px;
  margin-bottom:25px;
  border-radius:6px;
  box-shadow:0 18px 15px rgb(0 0 0 / 12%), inset 0 0 0 1px rgba(255, 255, 255, .08);
}

/* titles */
.result h2{
  color:#d6c06f;
  font-size:1.2em;
  margin:0 0 5px 0;
}

.result h1{
  font-size:1.9em;
  margin:0 0 15px 0;
  font-weight:700;
    color: #000000;
}

/* text */
.result p{
  font-size:1.05em;
  line-height:1.7;
  color:#000000;
}

/* ===== ANIMATION ===== */
@keyframes fadeUp{
  from{
    opacity:0;
    transform:translateY(25px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px){
  .tarot-layout{
    flex-direction:column;
    gap:45px;
    text-align:center;
  }

  .result{
    text-align:center;
  }
}

/* ===== Newsy/WPBakery helpers ===== */
.tarot-draw .tarot-title{
  font-size:18px;
  font-weight:700;
  margin:0 0 14px 0;
}

.tarot-draw.align-left .tarot-title{ text-align:left; }
.tarot-draw.align-center .tarot-title{ text-align:center; }
.tarot-draw.align-right .tarot-title{ text-align:right; }

.tarot-draw.align-left .tarot-layout{ justify-content:flex-start; }
.tarot-draw.align-center .tarot-layout{ justify-content:center; }
.tarot-draw.align-right .tarot-layout{ justify-content:flex-end; }

/* Make it responsive on smaller containers */
@media (max-width: 768px){
  .tarot-layout{ flex-direction:column; gap:26px; }
  .result{ text-align:center; }
}
/* --- Newsy block integration --- */

.ak-block-tarot .ak-block-inner {
    padding-top: 0px;
}

/* Tarot layout fix */
.ak-block-tarot .tarot-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* Align support */
.tarot-draw.align-left .tarot-layout {
    align-items: flex-start;
}

.tarot-draw.align-right .tarot-layout {
    align-items: flex-end;
}

/* Card sizing consistency */
.ak-block-tarot .card-back {
    width: 100%;
    padding: 30px;
    max-width: 100%;
}

/* Result spacing */
.ak-block-tarot .result {
    max-width: 420px;
    text-align: center;
}

.ak-block-tarot .card-back {
    position: relative; /* ключово */
    display: inline-block;
}
@keyframes tarot-spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.ak-block-tarot .card-back .loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 182px;
    height: 182px;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: block; /* показва се от JS */
    pointer-events: none;

}
.ak-block-tarot { margin-bottom: 10px !important; }
.ak-block-tarot:hover .card-back .loader {

    animation: tarot-spin 1.2s linear infinite;
}

.ak-block-tarot .card-back .back {
    position: relative;
    z-index: 1;
}

/* optional: лек overlay ефект */
.ak-block-tarot .card-back.loading .back {
    opacity: 0.9;
}
.ak-block-tarot .card-back {
    transition: opacity .35s ease, transform .35s ease;
    border: 1px #565656 solid;
}

.ak-block-tarot .tarot-draw.is-done .card-back {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
    display: none;
}

body.dark .tarot-result-inner p {
  color: #ffffff;
}
body.dark .tarot-result-inner p {
  color: #ffffff;
}

body.dark .ak-block-tarot .card-back {
    width: 100%;
    padding: 30px;
    max-width: 100%;
    background: #1e1e1e !important;
    border: 1px #000000 solid !important;
}