/* Psychological tests integrated into the new StarGid theme. */
.tests-page.wrapper{width:100%;max-width:900px;margin:0 auto;padding:clamp(24px,4vw,44px) var(--gutter,20px);box-sizing:border-box;color:var(--text)}
.tests-page .card{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:clamp(18px,3vw,30px);margin:0 0 18px;box-shadow:var(--shadow);box-sizing:border-box}
.tests-page .card h1{font-size:clamp(28px,4vw,42px);line-height:1.15;margin:0 0 18px;letter-spacing:-.03em}
.tests-page .card h2{font-size:clamp(20px,2.5vw,27px);line-height:1.25;margin:0 0 16px}
.tests-page .card p,.tests-page .card li{font-size:16px;line-height:1.7;color:var(--muted)}
.tests-page .card ul{padding-left:22px}.tests-page form.card{display:block}
.tests-page form.card label{display:block;line-height:1.55;color:var(--text);margin:0 0 16px}
.tests-page .select-wrap{position:relative;width:100%;margin-top:8px}
.tests-page .answer{width:100%;min-height:48px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface2);color:var(--text);font:inherit;box-sizing:border-box;cursor:pointer}
.tests-page .zodiac-dd__box{position:absolute;display:none;top:calc(100% - 3px);left:0;width:100%;z-index:20;max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}
.tests-page .zodiac-dd__item{padding:11px 14px;color:var(--text);cursor:pointer}.tests-page .zodiac-dd__item:hover{background:var(--surface2)}
.tests-page button{width:100%;min-height:46px;margin:8px 0 0;padding:12px 16px;border:1px solid var(--line);border-radius:13px;background:var(--surface2);color:var(--text);font:inherit;font-weight:650;cursor:pointer;transition:transform .18s,background .18s}
.tests-page button:hover{background:color-mix(in srgb,var(--accent) 9%,var(--surface2));transform:translateY(-1px)}
.tests-page .blok-s{display:flex;width:100%;margin-top:20px}.tests-page .blok-s a{display:block;width:100%;text-decoration:none}
.tests-page .block-1,.tests-page .block-2,.tests-page .block-3{display:flex;flex-wrap:wrap;gap:10px}
.tests-page .block-1 button,.tests-page .block-2 button,.tests-page .block-3 button{width:auto;min-width:min(100%,220px);flex:1 1 220px;margin:0;white-space:normal;text-align:center}
.tests-page #error{color:#d65c5c;margin-top:12px}
#loader{position:fixed;inset:0;z-index:9999;display:none;align-items:center;justify-content:center;flex-direction:column;gap:16px;background:var(--bg);color:var(--text)}
#loader .spinner{width:52px;height:52px;border:3px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:test-spin .9s linear infinite}
@keyframes test-spin{to{transform:rotate(360deg)}}
@media(max-width:560px){.tests-page.wrapper{padding:22px 14px}.tests-page .card{border-radius:18px;padding:18px}.tests-page .card p,.tests-page .card li{font-size:15px}.tests-page .block-1 button,.tests-page .block-2 button,.tests-page .block-3 button{flex-basis:100%}}

/* Test answer forms follow the visual style of the personal horoscope form. */
.tests-page.wrapper{max-width:860px}
.tests-page form.card{display:grid;gap:10px;padding:clamp(20px,4vw,38px);border:1px solid var(--line);border-radius:28px;background:var(--card,var(--surface));box-shadow:var(--shadow);color:var(--text)}
.tests-page form.card h2{font-size:clamp(1.2rem,2.5vw,1.55rem);line-height:1.3;margin:0 0 8px;color:var(--text)}
.tests-page form.card label{font-weight:650;color:var(--text);line-height:1.55}
.tests-page form.card .answer{width:100%;min-height:48px;box-sizing:border-box;border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--surface);color:var(--text);font:inherit;transition:border-color .18s,box-shadow .18s}
.tests-page form.card .answer:focus{outline:2px solid color-mix(in srgb,var(--accent) 24%,transparent);border-color:var(--accent)}
.tests-page form.card button[type=submit]{width:100%;min-height:50px;margin-top:12px;padding:12px 18px;border:0;border-radius:12px;background:var(--accent);color:#fff;font:inherit;font-weight:700;box-shadow:0 10px 28px rgba(99,87,217,.22);transition:filter .18s,transform .18s}
.tests-page form.card button[type=submit]:hover{background:var(--accent);filter:brightness(1.06);transform:translateY(-1px)}
.tests-page form.card .zodiac-dd__box{border-radius:12px;border-color:var(--line);background:var(--surface);box-shadow:var(--shadow)}
.tests-page form.card .zodiac-dd__item{padding:12px 14px;line-height:1.5}
@media(max-width:560px){.tests-page form.card{padding:19px;border-radius:16px}}

/* Dropdown answer options match the autocomplete suggestions on /personal. */
.tests-page form.card .select-wrap{margin-top:8px}
.tests-page form.card .zodiac-dd__box{display:none;gap:2px;padding:5px;max-height:280px;overflow-y:auto;overflow-x:hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}
.tests-page form.card .zodiac-dd__item{display:block;box-sizing:border-box;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);line-height:1.5;transition:background .15s,border-color .15s}
.tests-page form.card .zodiac-dd__item:hover,.tests-page form.card .zodiac-dd__item:focus-visible{background:var(--surface2);border-color:var(--accent);color:var(--text);outline:none}
html[data-theme="dark"] .tests-page form.card .zodiac-dd__item{background:var(--surface);border-color:var(--line);color:var(--text)}
html[data-theme="dark"] .tests-page form.card .zodiac-dd__item:hover,html[data-theme="dark"] .tests-page form.card .zodiac-dd__item:focus-visible{background:var(--surface2);border-color:var(--accent);color:var(--text)}

/* Dropdown answer options match the autocomplete suggestions on /personal. */
.tests-page form.card .select-wrap{margin-top:8px}
.tests-page form.card .zodiac-dd__box{display:none;gap:2px;padding:5px;max-height:280px;overflow-y:auto;overflow-x:hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}
.tests-page form.card .zodiac-dd__item{display:block;box-sizing:border-box;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);line-height:1.5;transition:background .15s,border-color .15s}
.tests-page form.card .zodiac-dd__item:hover,.tests-page form.card .zodiac-dd__item:focus-visible{background:var(--surface2);border-color:var(--accent);color:var(--text);outline:none}
html[data-theme="dark"] .tests-page form.card .zodiac-dd__item{background:var(--surface);border-color:var(--line);color:var(--text)}
html[data-theme="dark"] .tests-page form.card .zodiac-dd__item:hover,html[data-theme="dark"] .tests-page form.card .zodiac-dd__item:focus-visible{background:var(--surface2);border-color:var(--accent);color:var(--text)}

/* Keep the options panel floating below its trigger; it must not create a second field in the form layout. */
.tests-page form.card .select-wrap{display:block;position:relative;min-width:0}
.tests-page form.card .select-wrap>.answer{display:block;position:relative;z-index:1;margin:0}
.tests-page form.card .select-wrap>.zodiac-dd__box{position:absolute!important;top:calc(100% - 3px)!important;left:0!important;right:0!important;width:100%!important;margin:0!important;box-sizing:border-box;z-index:100!important}
.tests-page form.card .zodiac-dd__box[style*="display: block"]{display:block!important}

/* Match the personal-form autocomplete: individual suggestion rows, no extra outer field. */
.tests-page form.card .select-wrap{position:relative!important;display:block!important;overflow:visible!important}
.tests-page form.card .select-wrap>.zodiac-dd__box{position:absolute!important;display:none;grid-template-columns:minmax(0,1fr);gap:2px!important;top:calc(100% - 3px)!important;bottom:auto!important;left:0!important;right:0!important;width:100%!important;max-height:260px!important;margin:0!important;padding:0!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:100!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;box-sizing:border-box!important}
.tests-page form.card .select-wrap>.zodiac-dd__box[style*="display: grid"]{display:grid!important}
.tests-page form.card .zodiac-dd__item{display:block!important;width:100%!important;box-sizing:border-box!important;margin:0!important;padding:9px 12px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--surface)!important;color:var(--text)!important;line-height:1.5!important;cursor:pointer!important}
.tests-page form.card .zodiac-dd__item:hover,.tests-page form.card .zodiac-dd__item:focus-visible{background:var(--surface2)!important;border-color:var(--accent)!important;color:var(--text)!important;outline:none!important}

/* Open answer choices in normal document flow so later fields move down, like /personal autocomplete. */
.tests-page form.card .select-wrap>.zodiac-dd__box{position:static!important;top:auto!important;left:auto!important;right:auto!important;width:100%!important;margin:6px 0 0!important;z-index:auto!important;max-height:260px!important;overflow-y:auto!important;overflow-x:hidden!important}
.tests-page form.card .select-wrap>.zodiac-dd__box[style*="display: grid"]{display:grid!important}

/* Set the test content block to 900px on desktop while preserving responsive gutters. */
.tests-page.wrapper{width:100%;max-width:900px!important}
@media(max-width:560px){.tests-page.wrapper{max-width:100%!important}}

/* Make each bordered test card 900px wide; account for the wrapper's side padding. */
.tests-page.wrapper{width:100%;max-width:calc(900px + var(--gutter,20px) + var(--gutter,20px))!important;margin-inline:auto}
@media(max-width:560px){.tests-page.wrapper{max-width:100%!important}}


/* Test forms: show the complete answer list like the full list on /compatibility. */
.tests-page form.card .select-wrap > .zodiac-dd__box {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tests-page form.card .select-wrap > .zodiac-dd__box::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Align the first test card with the horoscope sidebar. */
.tests-layout > .tests-main-column > .tests-page.wrapper { padding-top: 0 !important; }

/* Shared personal-horoscope layout for psychological test and result pages. */
.tests-layout-section{padding-block:clamp(24px,3vw,42px)!important}
.tests-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,300px);gap:clamp(24px,3vw,38px);align-items:start}
.tests-main-column{min-width:0}
.tests-main-column>.tests-page.wrapper{width:100%;max-width:none;margin:0;padding:0!important}
.tests-feature-sidebar{min-width:0;display:grid;gap:14px;position:sticky;top:100px}
.tests-feature-sidebar .feature-card{min-width:0}
.tests-zodiac-bottom{padding:clamp(26px,4vw,48px) 20px;background:var(--section-bg,transparent)}
.tests-zodiac-inner{max-width:1200px;margin:0 auto}
.tests-zodiac-inner h2{margin:0 0 18px;font-size:clamp(22px,2.4vw,30px)}
.tests-zodiac-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.tests-zodiac-grid .zodiac-card{min-width:0}
@media(max-width:900px){.tests-layout{grid-template-columns:minmax(0,1fr)}.tests-feature-sidebar{position:static;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tests-feature-sidebar .side-card{grid-column:1/-1}.tests-zodiac-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.tests-layout-section{padding-block:18px!important}.tests-feature-sidebar{grid-template-columns:minmax(0,1fr)}.tests-zodiac-bottom{padding:24px 14px}.tests-zodiac-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}
