/* ============================================================
   Daily Horoscope Widget — horoscope.css
   All colours come from CSS variables injected by DH_Themes.
   To change the look, go to Admin → Daily Horoscope → Theme.
   ============================================================ */

/* ── Default fallback values (overridden by PHP-injected :root) ── */
:root {
    --dh-bg-from:       #1a0533;
    --dh-bg-to:         #2d1b6e;
    --dh-accent:        #f0c040;
    --dh-accent-text:   #1a0533;
    --dh-primary:       #9b59b6;
    --dh-primary-light: #f0e8ff;
    --dh-primary-mid:   #f8f0ff;
    --dh-btn-from:      #2d1b6e;
    --dh-btn-to:        #9b59b6;
    --dh-text-dark:     #1a0533;
    --dh-card-bg:       #ffffff;
    --dh-card-border:   #e8e0f0;
}

/* ── Wrapper ── */
.dh-wrapper {
    font-family: 'Georgia', serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.dh-wrapper *, .dh-wrapper *::before, .dh-wrapper *::after {
    box-sizing: border-box;
}

/* ── Header ── */
.dh-header {
    text-align: center;
    background: linear-gradient(135deg, var(--dh-bg-from) 0%, var(--dh-bg-to) 50%, var(--dh-bg-from) 100%);
    color: #fff;
    padding: 40px 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.dh-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,255,255,0.12)'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.dh-stars {
    font-size: 18px;
    letter-spacing: 6px;
    color: var(--dh-accent);
    margin-bottom: 10px;
    animation: dh-twinkle 3s ease-in-out infinite alternate;
}

@keyframes dh-twinkle {
    from { opacity: 0.7; }
    to   { opacity: 1;   }
}

.dh-title {
    font-size: 2em;
    margin: 0 0 8px;
    color: var(--dh-accent);
    text-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.dh-date {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 20px;
}

/* ── Language toggle ── */
.dh-lang-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
}

.dh-lang-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: background 0.3s, color 0.3s;
}

.dh-lang-btn.active {
    background: var(--dh-accent);
    color: var(--dh-accent-text);
    font-weight: bold;
}

.dh-lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* ── Signs grid ── */
.dh-signs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* ── Sign card ── */
.dh-sign-card {
    background: var(--dh-card-bg);
    border: 1px solid var(--dh-card-border);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dh-sign-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--dh-primary);
}

.dh-sign-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.dh-symbol {
    font-size: 2.2em;
    line-height: 1;
    flex-shrink: 0;
}

.dh-sign-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dh-sign-names strong {
    font-size: 1.05em;
    color: var(--dh-text-dark);
}

.dh-hi-name {
    color: var(--dh-primary);
    font-size: 0.9em;
}

.dh-sign-names small {
    color: #999;
    font-size: 0.75em;
}

/* ── Read button ── */
.dh-read-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--dh-btn-from), var(--dh-btn-to));
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: opacity 0.2s, transform 0.2s;
    text-align: center;
}

.dh-read-btn:hover {
    opacity: 0.88;
    transform: scale(1.02);
}

/* ── Language show/hide ── */
.dh-wrapper[data-lang="en"] .dh-hi-name,
.dh-wrapper[data-lang="en"] .dh-btn-hi,
.dh-wrapper[data-lang="en"] .dh-loading-hi,
.dh-wrapper[data-lang="en"] .dh-lucky-label-hi { display: none; }

.dh-wrapper[data-lang="hi"] .dh-en-name,
.dh-wrapper[data-lang="hi"] .dh-btn-en,
.dh-wrapper[data-lang="hi"] .dh-loading-en,
.dh-wrapper[data-lang="hi"] .dh-lucky-label-en { display: none; }

/* ── Modal overlay ── */
.dh-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: dh-fadeIn 0.2s ease;
}

@keyframes dh-fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Modal box ── */
.dh-modal {
    background: linear-gradient(145deg, var(--dh-card-bg) 0%, var(--dh-primary-mid) 100%);
    border-radius: 20px;
    padding: 35px;
    max-width: 560px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: dh-slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes dh-slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.dh-modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: var(--dh-primary-light);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: var(--dh-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s;
    line-height: 1;
}

.dh-modal-close:hover { filter: brightness(0.88); }

.dh-modal-sign-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--dh-primary-light);
}

.dh-modal-symbol { font-size: 3.5em; line-height: 1; }

.dh-modal-sign-name {
    font-size: 1.5em;
    color: var(--dh-text-dark);
    margin: 0 0 4px;
}

.dh-modal-date-range {
    color: var(--dh-primary);
    margin: 0;
    font-size: 0.9em;
}

/* ── Spinner ── */
.dh-modal-loading {
    text-align: center;
    padding: 30px;
}

.dh-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--dh-primary-light);
    border-top-color: var(--dh-primary);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: dh-spin 0.8s linear infinite;
}

@keyframes dh-spin { to { transform: rotate(360deg); } }

/* ── Horoscope text ── */
.dh-modal-text {
    font-size: 1.05em;
    line-height: 1.85;
    color: #333;
    background: rgba(0, 0, 0, 0.03);
    border-left: 4px solid var(--dh-primary);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 24px;
}

/* ── Lucky info grid ── */
.dh-lucky-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dh-lucky-item {
    background: var(--dh-card-bg);
    border: 1px solid var(--dh-primary-light);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dh-lucky-icon { font-size: 1.4em; }

.dh-lucky-label-en,
.dh-lucky-label-hi {
    font-size: 0.72em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.dh-lucky-item strong {
    font-size: 1em;
    color: var(--dh-text-dark);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .dh-title           { font-size: 1.4em; }
    .dh-signs-grid      { grid-template-columns: repeat(2, 1fr); }
    .dh-modal           { padding: 24px 16px; }
    .dh-lucky-grid      { grid-template-columns: 1fr 1fr; }
    .dh-modal-sign-name { font-size: 1.2em; }
}

@media (max-width: 380px) {
    .dh-signs-grid { grid-template-columns: 1fr; }
}
