/**
 * Tool-Specific Stylesheet for Chinese Zodiac Calculator.
 *
 * This stylesheet combines general styles, thematic overrides,
 * and specific layout adjustments for the calculator tool.
 */

/* ============================================== */
/* === 1. Variable Definitions for Thematic Colors === */
/* ============================================== */
:root {
    --czc-red-primary: #c0392b; /* A deep, auspicious red */
    --czc-red-hover: #a93226;   /* A darker red for hover effects */
    --czc-gold-accent: #f39c12; /* A warm, vibrant gold for accents */
    --czc-bg-light: #fffaf0;    /* A very light, warm cream background */
    --czc-border-light: #faebd7; /* A slightly darker cream for borders */
    --czc-text-dark: #34495e;   /* A soft, dark slate gray for text */
}

/* ============================================== */
/* === 2. General Tool Container and Element Styles === */
/* ============================================== */

/* Main tool container Themimg */
.auras-tool-container {
    background-color: var(--czc-bg-light) !important;
    border-color: var(--czc-border-light) !important;
    box-sizing: border-box;
    width: 100%;
    max-width: min(100%, 980px);
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

.chinese-zodiac-calculator.is-compact {
    padding: 16px;
}

.auras-tool-container *,
.auras-tool-container *::before,
.auras-tool-container *::after {
    box-sizing: border-box;
}

/* Override default input style for selects to match the design */
.auras-tool-container select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Override textarea style to match */
.auras-tool-container textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
}

/* Style for the group of date selectors */
.auras-tool-date-selector-group {
    display: grid;
    /* Use the first column for the wider month, and the other two for day/year */
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}

/* Notice Bar Theming */
.auras-tool-notice {
    background-color: #fef5e7 !important;
    border-left-color: var(--czc-gold-accent) !important;
    color: var(--czc-text-dark) !important;
}

/* Accordion Header When Open */
.auras-tool-accordion-item.is-open .auras-tool-accordion-trigger {
    color: var(--czc-red-primary) !important;
}

/* Main Calculate Button Theming */
.auras-tool-button-calculate {
    background-color: var(--czc-red-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.25) !important;
}
.auras-tool-button-calculate:hover {
    background-color: var(--czc-red-hover) !important;
    transform: translateY(-2px);
}

/* AI Insight Button Theming */
.auras-ai-button {
    background-color: var(--czc-gold-accent) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.25) !important;
}
.auras-ai-button:hover {
    background-color: #d68910 !important;
    transform: translateY(-2px);
}

/* ============================================== */
/* === 3. Result Section Styles === */
/* ============================================== */

/* Main heading in result section */
.auras-tool-result h3 {
    text-align: center;
    color: var(--czc-red-primary) !important; /* Thematic override */
}

/* Styles for the result card (flex layout) */
.czc-result-card {
    display: flex;
    align-items: center; /* Vertically center aligned content */
    gap: 25px;
    background-color: #ffffff; /* Match the accordion item background */
    padding: 20px;
    border-radius: 4px;
    margin-top: 15px;
    max-width: 550px;
    margin: 15px auto 0 auto; /* Centered with top margin */
}

/* Image within the result card */
.czc-result-image {
    width: 100px;
    height: 75px; /* Adjusted height from 100px */
    object-fit: contain;
    flex-shrink: 0; /* Prevents shrinking */
    margin-right: 30px; /* Added right margin */
}

/* Details text within the result card */
.czc-result-details {
    flex-grow: 1; /* Allows details to take available space */
}
.czc-result-details p {
    margin: 0 0 12px 0; /* Adjusted margin-bottom from 10px */
    line-height: 1.6;
    color: #566573 !important; /* Thematic override */
}
.czc-result-details p:last-child {
    margin-bottom: 0;
}
.czc-result-details strong {
    font-weight: 600;
    color: var(--czc-text-dark) !important; /* Thematic override */
}

/* ============================================== */
/* === 4. Zodiac Grid Styles === */
/* ============================================== */

/* Container for the zodiac grid */
.czc-zodiac-grid {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Heading for the zodiac grid */
.czc-zodiac-grid h4 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
    color: var(--czc-text-dark) !important; /* Thematic override */
}

/* Grid container for zodiac signs */
.czc-zodiac-signs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: clamp(12px, 2.5vw, 25px);
    min-width: 0;
}

/* Individual zodiac sign item */
.czc-zodiac-sign {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* Common padding/border-radius are handled by czc-zodiac-link for hover effect */
    padding: 10px; /* Kept for general spacing within the block */
    min-width: 0;
}

/* Image within zodiac sign */
.czc-zodiac-sign img {
    width: 80px;   /* Larger image size */
    height: 80px;  /* Larger image size */
    object-fit: contain;
    margin-bottom: 10px; /* spacing between image and text */
    transition: transform 0.3s ease; /* Transition for hover effect */
}

/* Text within zodiac sign */
.czc-zodiac-sign p {
    margin: 0; /* Remove default paragraph margin */
    font-size: 1.1em; /* Larger text size */
    font-weight: 600; /* Bolder text */
    color: #3d4a59; /* Default text color */
}

/* Container for clickable zodiac signs (for better hover/active states) */
.czc-zodiac-link {
    display: block; /* Make the whole area clickable */
    min-width: 0;
    text-decoration: none;
    color: inherit; /* Inherit text color by default */
    border-radius: 8px;
    padding: 10px; /* Apply padding here to make the hover area larger */
    transition: background-color 0.2s ease-out, transform 0.2s ease-out;
    cursor: pointer; /* Indicate it's clickable */
}

/* Hover effect for clickable zodiac signs */
.czc-zodiac-link:hover {
    background-color: #fef5e7; /* Light cream background on hover */
    transform: translateY(-4px); /* Slight lift effect */
}
.czc-zodiac-link:hover .czc-zodiac-sign img {
    transform: scale(1.1); /* Image slightly scales on hover */
}
/* Ensure inner .czc-zodiac-sign:hover img doesn't override */
.czc-zodiac-sign:hover img {
    transform: none; /* Reset transform for direct hover on sign, as link handles it */
}


/* Style for the currently active zodiac sign */
.czc-zodiac-sign.is-active {
    /* Background and text color are set by .czc-zodiac-link.has() for better interaction */
    background-color: transparent; /* Ensure no conflicting background */
}
.czc-zodiac-sign.is-active p {
    /* Text color is set by .czc-zodiac-link.has() for consistency */
    font-weight: 700; /* Ensure text is bold if it's active */
}

/* Theming for the active zodiac sign via its link */
.czc-zodiac-link:has(.czc-zodiac-sign.is-active) {
    background-color: #fdebd0 !important; /* Light gold background for active */
    transform: translateY(-4px); /* Keep lift effect for active */
    cursor: default; /* Not clickable if already active */
}
.czc-zodiac-link:has(.czc-zodiac-sign.is-active) .czc-zodiac-sign p {
    color: var(--czc-red-primary) !important; /* Primary red text for active state */
}


/* ============================================== */
/* === 5. Responsive Adjustments === */
/* ============================================== */

@media (max-width: 768px) {
    .chinese-zodiac-calculator.is-compact {
        padding: 12px;
    }

    /* Result card in mobile view */
    .czc-result-card {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center horizontally */
        text-align: center; /* Center text */
    }
    /* Adjust result details for mobile */
    .czc-result-details {
        text-align: left; /* Keep text left-aligned within its block */
    }

    /* Mobile zodiac grid: 3 columns */
    .czc-zodiac-signs {
        grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
        gap: 15px; /* Slightly reduced gap for mobile */
    }
    /* Mobile zodiac sign image size */
    .czc-zodiac-sign img {
        width: 70px;
        height: 70px;
    }
}
