/*
 Theme Name:         Zephyr Child
 Theme URI:          https://salmangholami.ir
 Description:        قالب فرزند اختصاصی برای سایت گرافکد، بهینه‌سازی شده برای سرعت و عملکرد (ZHM-X Architecture).
 Author:             Salman Gholami
 Author URI:         https://salmangholami.ir
 Template:           Zephyr
 Version:            2.1.0
 Requires at least:  6.2
 Requires PHP:       8.2
 Text Domain:        zephyr-child
*/

/* ==========================================================================
   TABLE OF CONTENTS
   1. Global Settings
   2. WooCommerce Pagination
   3. Custom Cards (Icons)
   4. Welcome Coupon Bar
   5. Gravity Forms Overrides
   6. Blog Ratings & Header
   7. Sticky Cart & Checkout
   ========================================================================== */

/* NOTE: Most modular CSS is loaded via Manager.php (Assets).
   This file is for global overrides and WP requirements. */

/* -----------------------------------------------------------
   2. WooCommerce My Account Pagination Styling
   ----------------------------------------------------------- */
.zephyr-child-downloads-pagination {
    margin-top: 40px;
    width: 100%;
    text-align: center;
}

/* حذف استایل‌های لیست پیش‌فرض */
.zephyr-child-downloads-pagination ul {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    list-style: none !important;
    padding: 0;
    margin: 0;
    border: none !important;
}

.zephyr-child-downloads-pagination ul li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    float: none !important;
    overflow: hidden;
}

/* استایل دکمه‌ها */
.zephyr-child-downloads-pagination ul li a,
.zephyr-child-downloads-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 5px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    background-color: #f6f6f6;
    color: #333;
    border-radius: 14px;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

/* استایل صفحه فعال */
.zephyr-child-downloads-pagination ul li span.current {
    background-color: #8e66ff;
    color: #fff;
    box-shadow: 0 4px 10px rgba(142, 102, 255, 0.3);
    transform: translateY(-2px);
}

/* استایل هاور */
.zephyr-child-downloads-pagination ul li a:hover {
    background-color: #fff;
    color: #8e66ff;
    border-color: #8e66ff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* فلش‌ها */
.zephyr-child-downloads-pagination ul li a.prev,
.zephyr-child-downloads-pagination ul li a.next {
    background-color: #f0f0f0;
    color: #555;
    width: 45px;
}

/* -----------------------------------------------------------
   3. Custom Cards (Icons)
   ----------------------------------------------------------- */
.sc-icon-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 15px;
    font-family: var(--font-family-base);
}

.sc-icon-card .sc-card-description {
    text-align: justify;
    font-size: 1rem;
    color: #000000 !important;
    margin-top: 10px;
}

.sc-icon-card .sc-title {
    font-size: 1.2rem !important;
    font-weight: 600;
    margin: 0;
    transition: color var(--comp-transition-fast);
}

/* -----------------------------------------------------------
   4. Welcome Coupon Bar
   ----------------------------------------------------------- */
.grafcode-welcome-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.grafcode-coupon {
    background: #f0f2f5;
    border: 1px dashed #ccc;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    min-width: 180px;
    text-align: center;
    position: relative;
}

.grafcode-coupon:hover {
    background: #e6e6e6;
    border-color: #999;
}

.grafcode-coupon.copied {
    background-color: #4caf50 !important;
    border-color: #4caf50 !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.grafcode-coupon .code {
    font-family: monospace;
    font-size: 1.1em;
}

.grafcode-coupon.copied .code {
    color: #fff;
}

/* -----------------------------------------------------------
   5. Gravity Forms Overrides
   ----------------------------------------------------------- */
.gform_wrapper.gravity-theme .gform_required_legend {
    display: none !important;
}

/* -----------------------------------------------------------
   6. Blog Ratings & Header
   ----------------------------------------------------------- */
.ar-rating-top-blog {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.ar-rating-top-blog .sg-seo-rating-message,
.ar-rating-top-blog .sg-seo-rating-title {
    margin: 0;
}

.ar-likes button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background-color: #f6f7f7;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.main-header {
    background-color: #2b3499;
    padding: 6px 5px;
    text-align: center;
    width: max-content;
    border-radius: 148rem;
}

.blinking-text {
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: blink-glow 5s infinite alternate;
}

@keyframes blink-glow {
    0% {
        opacity: 1;
        color: #FFD700;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        opacity: 0.8;
        color: #E6E6FA;
        text-shadow: none;
    }
    100% {
        opacity: 1;
        color: #FFD700;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.5);
    }
}

/* -----------------------------------------------------------
   7. Sticky Cart & Checkout (Desktop Only)
   ----------------------------------------------------------- */
@media (min-width: 901px) {
    .us-woo-cart_compact .woocommerce .shop_table.cart, 
    .woocommerce-checkout #customer_details {
        position: sticky !important;
        top: 15rem !important;
        /* Note: 'float' might be needed depending on Zephyr version, kept for safety */
        float: right; 
    }
}

/* -----------------------------------------------------------
   8. Mobile Responsive Adjustments
   ----------------------------------------------------------- */
@media (max-width: 480px) {
    .sc-icon-card .sc-card-description {
        font-size: 1rem !important;
    }
    .sc-icon-card .sc-title {
        font-size: 1.2rem !important;
    }
    .zephyr-child-downloads-pagination ul {
        gap: 6px;
    }
    .zephyr-child-downloads-pagination ul li a,
    .zephyr-child-downloads-pagination ul li span {
        min-width: 38px;
        height: 38px;
        font-size: 14px;
        border-radius: 10px;
    }
}