/* ===========================================
   MOON PHASE BLOCK STYLES
   =========================================== */

.ez-moon-phase-widget {
    padding: 1.5rem;
    border-radius: 8px;
    background: inherit;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Moon phase display */
.ez-moon-phase-display {
    margin-bottom: 1.5rem;
}

.ez-moon-phase-image {
    display: block;
    margin: 0 auto 1rem auto;
    border-radius: 50%;
    object-fit: cover;
}

.ez-moon-phase-emoji {
    display: block;
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.ez-moon-phase-text {
    font: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: inherit;
}

/* Zodiac dropdown */
.ez-moon-phase-zodiac-select {
    margin-bottom: 1.5rem;
}

.ez-moon-zodiac-dropdown {
    width: 100%;
    max-width: 280px;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    font: inherit;
    font-size: 1rem;
    border: 2px solid currentColor;
    border-radius: 8px;
    background: inherit;
    color: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ez-moon-zodiac-dropdown:hover {
    opacity: 0.8;
}

.ez-moon-zodiac-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Moon content container */
.ez-moon-content-container {
    text-align: left;
}

.ez-moon-content-loading {
    text-align: center;
    padding: 1rem;
    color: inherit;
    opacity: 0.7;
    font-style: italic;
}

.ez-moon-content-result {
    line-height: 1.7;
}

.ez-moon-content-result p {
    margin-bottom: 1rem;
}

.ez-moon-content-result p:last-child {
    margin-bottom: 0;
}

/* Error state */
.ez-moon-phase-error {
    padding: 1rem;
    background-color: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    color: #c62828;
    text-align: center;
}

/* ===========================================
   CTA STYLES
   =========================================== */

.ez-moon-cta {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: transparent;
    border-radius: 8px;
    text-align: center;
}

.ez-moon-cta-text {
    font: inherit;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: inherit;
}

.ez-moon-cta-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 1rem auto;
    border-radius: 8px;
}

.ez-moon-cta-image-link {
    display: block;
    margin-bottom: 1rem;
}

.ez-moon-cta-image-link img {
    transition: opacity 0.2s ease;
}

.ez-moon-cta-image-link:hover img {
    opacity: 0.9;
}

.ez-moon-cta-button {
    display: inline-block;
    font: inherit;
    color: inherit;
    background: inherit;
    border: 1px solid currentColor;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ez-moon-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0.8;
}

.ez-moon-cta-link {
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: underline;
    color: inherit;
}

.ez-moon-cta-link:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* ===========================================
   RTL SUPPORT
   Applies to Arabic (ar), Hebrew (he), Urdu (ur), and Persian (fa)
   =========================================== */

/* Main widget RTL */
.ez-moon-phase-widget[dir="rtl"] {
    direction: rtl;
    text-align: center;
}

/* Dropdown RTL - swap arrow position and padding */
.ez-moon-phase-widget[dir="rtl"] .ez-moon-zodiac-dropdown {
    background-position: left 1rem center;
    padding-right: 1rem;
    padding-left: 2.5rem;
    text-align: right;
}

/* Content container RTL */
.ez-moon-phase-widget[dir="rtl"] .ez-moon-content-container {
    text-align: right;
}

.ez-moon-phase-widget[dir="rtl"] .ez-moon-content-result {
    direction: rtl;
    text-align: right;
}

/* Moon phase text RTL */
.ez-moon-phase-widget[dir="rtl"] .ez-moon-phase-text {
    direction: rtl;
}

/* CTA RTL support */
.ez-moon-phase-widget[dir="rtl"] .ez-moon-cta {
    direction: rtl;
    text-align: center;
}

.ez-moon-phase-widget[dir="rtl"] .ez-moon-cta-text {
    direction: rtl;
    text-align: center;
}

.ez-moon-phase-widget[dir="rtl"] .ez-moon-cta-button,
.ez-moon-phase-widget[dir="rtl"] .ez-moon-cta-link {
    direction: rtl;
}

/* Error state RTL */
.ez-moon-phase-widget[dir="rtl"] .ez-moon-phase-error {
    direction: rtl;
    text-align: center;
}

/* Progress bar RTL - animate from right to left */
.ez-moon-phase-widget[dir="rtl"] .ezhp-progress-bar {
    animation-direction: reverse;
}

/* ===========================================
   RESPONSIVE STYLES
   =========================================== */

@media (max-width: 480px) {
    .ez-moon-phase-widget {
        padding: 1rem;
    }

    .ez-moon-zodiac-dropdown {
        max-width: 100%;
    }

    .ez-moon-phase-text {
        font-size: 1rem;
    }

    .ez-moon-cta {
        padding: 1rem;
    }
}