/*
 * Sanathan Predictions — Shortcode Styles
 *
 * Reproduces the VedicAstro plugin's prediction UI design.
 * Used by [sas_prediction] — no dependency on vedicastroapi plugin.
 *
 * Structure mirrors VedicAstro's class names so the design is pixel-perfect.
 */

/* ── Reset / base ─────────────────────────────────────────────────────────── */
#sas-predictions-data *,
#sas-predictions-data *::before,
#sas-predictions-data *::after {
    box-sizing: border-box;
}

/* ── Typography helpers (mirrors VedicAstro's fs-*/lh-*/fw-* system) ──────── */
.fs-10 { font-size: 10px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-20 { font-size: 20px; }
.fs-40 { font-size: 40px; }
.lh-21 { line-height: 21px; }
.lh-24 { line-height: 24px; }
.lh-40 { line-height: 40px; }
.lh-48 { line-height: 48px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.m_0    { margin: 0; }
.p_0    { padding: 0; }
.p-15   { padding: 15px; }
.text_center { text-align: center; }
.display_flex { display: flex; }
.display_block { display: block !important; }
.d_block { display: block; }

/* ── Colour helpers ───────────────────────────────────────────────────────── */
.clr-black   { color: #000; }
.clr-black1  { color: #1e1e1e; }
.clr-darkblack { color: #333; }
.clr-gray    { color: #6b7280; }
.clr-blue    { color: #4923ff; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
#sas-predictions-data {
    font-family: inherit;
}

.astro_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.choose_services_box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    margin: 24px 0;
}

.prl-40 {
    padding-left: 24px;
    padding-right: 24px;
}

.bdr-gray {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

/* ── Header row (title + language dropdown) ───────────────────────────────── */
.heading_title_box {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.heading_title h2 {
    margin: 0 0 6px;
}

.heading_title p {
    margin: 0;
}

.language_drop select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    color: #374151;
    background: #f9fafb;
    cursor: pointer;
    min-width: 140px;
}

.language_drop select:focus {
    outline: none;
    border-color: #6366f1;
}

/* ── Zodiac sign grid ─────────────────────────────────────────────────────── */
.zodic_sign {
    margin-bottom: 28px;
}

.choose_services_row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) { .choose_services_row { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 600px)  { .choose_services_row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 400px)  { .choose_services_row { grid-template-columns: repeat(3, 1fr); } }

.astro_col { /* grid cell — no extra styles needed */ }

.zodics_sign_tab {
    cursor: pointer;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}

.zodics_sign_tab:hover {
    border-color: #6366f1;
}

.zodics_sign_tab.active {
    background: linear-gradient(136.97deg, #4923ff -22.03%, #a521ff 142.13%);
    border-color: transparent;
}

.zodics_sign_tab a {
    display: block;
    padding: 10px 4px 8px;
    text-decoration: none;
    color: inherit;
}

.zodics_icon {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.zodics_icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Show dark icon normally, white icon when active */
.zodics_sign_tab .zodic_white { display: none; }
.zodics_sign_tab .zodic_dark  { display: inline; }
.zodics_sign_tab.active .zodic_white { display: inline; }
.zodics_sign_tab.active .zodic_dark  { display: none; }

.zodics_content p {
    margin: 0;
    color: #374151;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.zodics_sign_tab.active .zodics_content p {
    color: #fff;
}

/* ── Cycle tabs (Daily / Weekly / Yearly) ─────────────────────────────────── */
.astro_content_tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.astro_content_menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}

.sas-cycle-tab {
    cursor: pointer;
}

.sas-cycle-tab a {
    display: block;
    padding: 10px 24px;
    color: #6b7280;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -2px;
}

.sas-cycle-tab:hover a,
.sas-cycle-tab.active a {
    color: #4923ff;
    border-bottom-color: #4923ff;
}

/* ── Prediction panels ────────────────────────────────────────────────────── */
.sas-pred-panel {
    display: none;
    animation: sasPredFadeIn 0.3s ease;
}

@keyframes sasPredFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Loading spinner ──────────────────────────────────────────────────────── */
.sas-pred-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px;
    color: #6b7280;
    font-size: 14px;
}

.sas-pred-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: sasPredSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes sasPredSpin {
    to { transform: rotate(360deg); }
}

.sas-pred-error,
.sas-pred-empty {
    padding: 20px 24px;
    color: #6b7280;
    font-size: 14px;
    font-style: italic;
}

/* ── Daily head (lucky colour + number) ──────────────────────────────────── */
.daily_head {
    padding: 16px 0 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.daily_head h4 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 500;
    color: #111;
}

.daily_head p {
    margin: 0 0 6px;
    font-size: 14px;
    color: #1e1e1e;
}

.lucky_color_code {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 6px;
    border: 1px solid rgba(0,0,0,.15);
}

/* ── Gradient score cards ─────────────────────────────────────────────────── */
.gradient_row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.gradient_box {
    display: grid;
    grid-template-columns: 137px auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    min-width: 0;
    flex: 1 1 340px;
}

.gradient_clr {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
}

.gradient_left {
    text-align: center;
    color: #fff;
}

.gradient_left .fs-40 {
    font-size: 40px;
    font-weight: 600;
    line-height: 1;
    display: block;
}

.gradient_left sub {
    font-size: 14px;
    font-weight: 600;
    vertical-align: baseline;
    line-height: 1;
}

.gradient_left .fs-20 {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    margin: 8px 0 0;
    color: rgba(255,255,255,.9);
}

.gradient_content {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    border: none;
    border-left: 1px solid #e5e7eb;
}

.gradient_content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

/* ── Gradient colour variants ─────────────────────────────────────────────── */
.gradient_skyblue {
    background: linear-gradient(136.97deg, #1a91ff -22.03%, #2fd38e 142.13%);
}

.gradient_blue {
    background: linear-gradient(136.97deg, #4923ff -22.03%, #a521ff 142.13%);
}

.gradient_green {
    background: linear-gradient(136.97deg, #0fc498 -22.03%, #5ad32f 142.13%);
}

.gradient_gold {
    background: linear-gradient(136.97deg, #ddcf4f -22.03%, #d3562f 142.13%);
}

.gradient_pink {
    background: linear-gradient(136.97deg, #dd4f4f -22.03%, #d32faf 142.13%);
}

/* ── Responsive adjustments ─────────────────────────────────────────────────  */
@media (max-width: 768px) {
    .choose_services_box { padding: 20px 12px; }
    .prl-40 { padding-left: 12px; padding-right: 12px; }
    .heading_title h2 { font-size: 24px; }
    .gradient_box { grid-template-columns: 110px auto; flex: 1 1 100%; }
    .gradient_clr { padding: 16px 10px; }
    .gradient_left .fs-40 { font-size: 28px; }
    .gradient_left .fs-20 { font-size: 13px; }
    .sas-cycle-tab a { padding: 10px 14px; font-size: 14px; }
}

@media (max-width: 480px) {
    .gradient_box { grid-template-columns: 90px auto; }
    .gradient_left .fs-40 { font-size: 22px; }
    .language_drop select { min-width: 110px; }
}

/* ── Raw HTML prediction content (legacy HTML stored in DB) ─────────────── */
.sas-pred-raw-content {
    padding: 20px 24px;
    line-height: 1.7;
    color: #374151;
    font-size: 15px;
}

.sas-pred-raw-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

.sas-pred-raw-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: #4923ff;
    margin: 16px 0 6px;
}

.sas-pred-raw-content p {
    margin: 0 0 10px;
    line-height: 1.7;
}

.sas-pred-raw-content p:last-child {
    margin-bottom: 0;
}

.sas-pred-raw-content strong {
    color: #1e1e1e;
    font-weight: 600;
}

.sas-pred-raw-content ul,
.sas-pred-raw-content ol {
    padding-left: 20px;
    margin: 8px 0 10px;
}

.sas-pred-raw-content li {
    margin-bottom: 4px;
}

/* ── Zodiac grid — ensure labels never break layout ─────────────────────── */
.astro_col {
    min-width: 0;
    overflow: hidden;
}

.zodics_sign_tab a {
    width: 100%;
    overflow: hidden;
}

/* ── Dark mode support ───────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .choose_services_box {
        background: #13132a;
        border-color: rgba(255,255,255,.08);
    }
    .zodics_content p { color: #d1d5db; }
    .gradient_content { background: #1a1a2e; border-color: rgba(255,255,255,.1); }
    .gradient_content p { color: #e5e7eb; }
    .daily_head { border-color: rgba(255,255,255,.08); }
    .daily_head h4 { color: #f9fafb; }
    .daily_head p { color: #d1d5db; }
    .bdr-gray { border-color: rgba(255,255,255,.1); }
    .clr-gray { color: #9ca3af; }
    .clr-black1 { color: #f3f4f6; }
    .clr-darkblack { color: #e5e7eb; }
    .astro_content_tabs { border-color: rgba(255,255,255,.1); }
    .sas-cycle-tab a { color: #9ca3af; }
    .gradient_box { border-color: rgba(255,255,255,.1); }
    .language_drop select { background: #1f1f35; color: #e5e7eb; border-color: rgba(255,255,255,.15); }
}
