/*
Theme Name: Idunn's Apple - Dr. Leigh Child
Theme URI: https://idunnsapple.com/
Description: Site-specific styles and custom business logic for Dr. Leigh 1.2+.
Author: Idunn's Apple
Template: drleigh
Version: 1.1.4
Text Domain: drleigh-child
*/

/* =============================================================
   RESTORED ORIGINAL IDUNN'S APPLE CUSTOM CSS (NOVEMBER 2025)
   Restores the parent theme's lost Appearance > Additional CSS.
   Original values retained except where explicitly noted below.
   ============================================================= */

.qodef-m-second-image img {
    border-radius: 10px !important;
    border: 1px solid #cccccc;
    padding: 10px;
    background-color: #fff;
}

#wc-woocommerce_payments-new-payment-method {
    width: 12px !important;
}

.woocommerce-error li,
.woocommerce-info li,
.woocommerce-message li {
    flex-direction: column !important;
}

.shipping label {
    display: inline !important;
}

#qodef-woo-page.qodef--single .qodef-buy-now-button,
#yith-quick-view-content.single-product .qodef-buy-now-button {
    display: none !important;
}

#qodef-woo-page.qodef--single form.cart,
#yith-quick-view-content.single-product form.cart {
    margin-top: 0 !important;
}

/* The original dark-footer rules are intentionally NOT reintroduced.
   The current preferred light-gray footer and readable pink copyright
   styles are consolidated at the end of this stylesheet. */

.wcpa_form_outer {
    margin: 0 0 -30px !important;
}

.mwai-messages-theme .mwai-input button {
    width: 50px !important;
}

.mwai-messages-theme .mwai-input {
    flex-direction: row !important;
}

.mwai-messages-theme .mwai-input .mwai-input-submit {
    margin: 0 0 0 4px !important;
}

.mwai-conversation {
    height: 500px !important;
}

.mwai-fullscreen {
    z-index: 99 !important;
}

.mwai-fullscreen .mwai-conversation {
    padding-top: 140px !important;
}

@media only screen and (max-width: 1024px) {
    .qodef-content-grid {
        width: 95% !important;
    }

    .mwai-fullscreen .mwai-conversation {
        padding-top: 100px !important;
    }
}

@media only screen and (max-width: 680px) {
    #qodef-woo-page.qodef--single .entry-summary .qodef-woo-product-title {
        font-size: 28px !important;
    }

    #qodef-woo-page.qodef--single .woocommerce-product-details__short-description.expand-description {
        max-height: 100% !important;
        display: inline-block !important;
    }

    .mwai-chatbot-container button {
        margin-left: 0 !important;
    }

    .mwai-messages-theme .mwai-input .mwai-input-text {
        margin-right: 4px !important;
    }

    .aichatbot {
        text-align: center !important;
    }
}

#qodef-woo-page.qodef--single .woocommerce-tabs .wc-tab {
    padding: 10px !important;
}

#qodef-woo-page.qodef--single .woocommerce-product-details__short-description,
#yith-quick-view-content.single-product .woocommerce-product-details__short-description {
    margin-top: 10px !important;
    max-height: none !important;
}

#qodef-woo-page.qodef--single form.cart .variations,
#yith-quick-view-content.single-product form.cart .variations {
    margin-bottom: 10px !important;
}

#qodef-woo-page.qodef--single form.cart .woocommerce-variation .woocommerce-variation-description,
#yith-quick-view-content.single-product form.cart .woocommerce-variation .woocommerce-variation-description {
    margin-top: 0 !important;
}

.reset_variations {
    display: none !important;
}

#qodef-woo-page.qodef--single form.cart .variations .select2-container--default,
#qodef-woo-page.qodef--single form.cart .variations select,
#yith-quick-view-content.single-product form.cart .variations .select2-container--default,
#yith-quick-view-content.single-product form.cart .variations select {
    width: 100% !important;
}

#qodef-woo-page.qodef--single .woocommerce-tabs,
#yith-quick-view-content.single-product .woocommerce-tabs {
    margin-top: 28px !important;
}

#qodef-woo-page.qodef--single .product_meta,
#yith-quick-view-content.single-product .product_meta {
    display: none !important;
}

a.added_to_cart.wc-forward {
    display: none !important;
}

@media only screen and (max-width: 1024px) {
    #qodef-page-inner {
        padding: 0 0 160px;
    }
}

/* The original site deliberately hid Related Products.
   Do not render a huge/one-column product recommendation section. */
.related.products {
    display: none !important;
}

/* Original button-53 design, with copied non-breaking spaces normalized. */
.button-53 {
    background-color: #c88ad0;
    border: 0 solid #e5e7eb;
    box-sizing: border-box;
    color: #000;
    display: flex;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 1rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1.75rem;
    padding: .75rem 1.65rem;
    position: relative;
    text-align: center;
    text-decoration: none solid #000;
    width: 100%;
    max-width: 460px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.button-53:focus {
    outline: 0;
}

.button-53:after {
    content: '';
    position: absolute;
    border: 1px solid #000;
    bottom: 4px;
    left: 4px;
    width: calc(100% - 1px);
    height: calc(100% - 1px);
}

.button-53:hover:after {
    bottom: 2px;
    left: 2px;
}

@media (min-width: 768px) {
    .button-53 {
        padding: .75rem 3rem;
        font-size: 1.25rem;
    }
}

.summary #payment-method-message,
.wp-block-woocommerce-product-price + #payment-method-message {
    height: 2em !important;
}

a.mycred-points-link {
    margin-top: 30px;
    font-size: 20px;
    font-weight: bold;
    display: inline-block;
    padding: 20px 30px;
    background-color: #ec9696;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 10px;
}

a.mycred-points-link:hover {
    background-color: #f78da7;
}

input[type=checkbox] {
    -webkit-appearance: auto;
}

#pmpro_pricing_fields {
    display: none;
}

.wpam_registration_input_help_text {
    display: none !important;
}

.woocommerce-product-rating {
    margin-top: 0 !important;
}

.qodef-m-star {
    color: #e9a6bc !important;
}

#qodef-woo-page .qodef-woo-ratings .qodef-m-star svg {
    margin-right: 0 !important;
}

.cr-all-reviews-shortcode .crstar-rating,
#reviews.cr-reviews-ajax-reviews #comments.cr-reviews-ajax-comments .cr-ajax-reviews-list .comment-text .crstar-rating,
#reviews #comments .cr-summaryBox-wrap .crstar-rating {
    color: #ec9696 !important;
}

/* =============================================================
   MOBILE SINGLE PRODUCT GALLERY: RESTORE ORIGINAL 4-COLUMN GRID
   The 2025 CSS displayed the real gallery-image thumbnail elements
   rather than relying on the small-screen Swiper rendering. The
   newer theme hides those image elements below 480px. Reassert the
   original layout once, only inside the WooCommerce gallery.
   ============================================================= */

@media (max-width: 768px) {
    #qodef-woo-page.qodef--single .woocommerce-product-gallery__wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        overflow: visible !important;
    }

    #qodef-woo-page.qodef--single .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
        display: block !important;
        order: 1 !important;
        width: 100% !important;
    }

    #qodef-woo-page.qodef--single .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    #qodef-woo-page.qodef--single .woocommerce-product-gallery__wrapper > .qodef-woo-thumbnails-wrapper {
        display: grid !important;
        order: 2 !important;
        width: 100% !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin: 0 !important;
    }

    #qodef-woo-page.qodef--single .qodef-woo-thumbnails-wrapper > .woocommerce-product-gallery__image {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    #qodef-woo-page.qodef--single .qodef-woo-thumbnails-wrapper > .woocommerce-product-gallery__image img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
        border-radius: 6px;
    }

    /* The original gallery thumbnails and Swiper are alternate mobile
       displays of the same images. Keep only the original grid visible. */
    #qodef-woo-page.qodef--single .woocommerce-product-gallery .qodef-woo-swiper-container {
        display: none !important;
    }

    #qodef-woo-page.qodef--single .woocommerce-product-gallery,
    #qodef-woo-page.qodef--single .woocommerce-product-gallery__wrapper {
        overflow: visible !important;
    }
}

/* =============================================================
   PREFERRED FOOTER COLORS
   This intentionally replaces the original Nov 2025 dark #444444
   navigation footer and white widget text with the user's current
   light-gray / pink layout, with uniform accessible dark text.
   ============================================================= */

#qodef-page-footer-middle-area,
#qodef-page-footer-middle-area-inner {
    background-color: #f3f3f3 !important;
    color: #454545 !important;
}

#qodef-page-footer-middle-area .widget,
#qodef-page-footer-middle-area .widget * {
    color: #454545 !important;
}

#qodef-page-footer-middle-area .widget a:hover,
#qodef-page-footer-middle-area .widget a:focus-visible {
    color: #ad5977 !important;
}

#qodef-page-footer-bottom-area,
#qodef-page-footer-bottom-area-inner {
    background-color: #e9a6bc !important;
    color: #383038 !important;
}

#qodef-page-footer-bottom-area .widget,
#qodef-page-footer-bottom-area .widget * {
    color: #383038 !important;
}

#qodef-page-footer-bottom-area .widget a:hover,
#qodef-page-footer-bottom-area .widget a:focus-visible {
    color: #752e49 !important;
}

/* =============================================================
   ROYAL ELEMENTOR COMPATIBILITY - CHILD THEME ONLY
   These styles support the saved Royal widget data after the Royal Elementor
   Addons plugin is disabled. No separate compatibility plugin is required.
   ============================================================= */

/* Before / After */
.ia-ba {
    position: relative;
    overflow: hidden;
    width: 100%;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.ia-ba .ia-ba-image {
    width: 100%;
}

.ia-ba .ia-ba-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.ia-ba .ia-ba-after {
    position: absolute;
    inset: 0;
    clip-path: inset(0 0 0 var(--ia-ba-position, 50%));
}

.ia-ba.ia-ba-vertical .ia-ba-after,
.ia-ba.wpr-ba-vertical .ia-ba-after {
    clip-path: inset(var(--ia-ba-position, 50%) 0 0 0);
}

.ia-ba-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--ia-ba-position, 50%);
    width: 2px;
    background: #fff;
    transform: translateX(-1px);
    cursor: ew-resize;
    z-index: 3;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}

.wpr-ba-vertical .ia-ba-divider {
    left: 0;
    right: 0;
    top: var(--ia-ba-position, 50%);
    bottom: auto;
    width: auto;
    height: 2px;
    transform: translateY(-1px);
    cursor: ns-resize;
}

.ia-ba-divider .wpr-ba-divider-icons {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #333;
    font-size: 25px;
    line-height: 1;
}

.ia-ba .wpr-ba-label {
    position: absolute;
    top: 16px;
    z-index: 4;
    background: rgba(255, 255, 255, .9);
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.2;
    border-radius: 2px;
    pointer-events: none;
}

.ia-ba .wpr-ba-label-1 {
    left: 16px;
}

.ia-ba .wpr-ba-label-2 {
    right: 16px;
}

/* Testimonials */
.ia-testimonials {
    position: relative;
    width: 100%;
}

.ia-testimonial-viewport {
    overflow: hidden;
    width: 100%;
}

.ia-testimonials .wpr-testimonial-carousel {
    display: flex;
    gap: 28px;
    will-change: transform;
    transition-property: transform;
    transition-timing-function: ease;
    transition-duration: .7s;
}

.ia-testimonials .wpr-testimonial-item {
    flex: 0 0 calc((100% - (var(--ia-visible, 2) - 1) * 28px) / var(--ia-visible, 2));
    box-sizing: border-box;
    min-width: 0;
}

.ia-testimonials .wpr-testimonial-meta {
    margin-bottom: 14px;
}

.ia-testimonials .wpr-testimonial-name {
    font-weight: 600;
    color: #2f2f2f;
}

.ia-testimonials .wpr-testimonial-job,
.ia-testimonials .wpr-testimonial-date {
    font-size: 13px;
    color: #777;
}

.ia-testimonials .wpr-testimonial-icon {
    font-family: Georgia, serif;
    font-size: 40px;
    line-height: .8;
    color: #e9a6bc;
    margin-bottom: 8px;
}

.ia-testimonials .wpr-testimonial-title {
    font-size: 20px;
    line-height: 1.35;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.ia-testimonials .wpr-testimonial-rating {
    display: flex;
    gap: 3px;
    color: #e9a6bc;
    margin: 8px 0;
}

.ia-testimonials .wpr-testimonial-content {
    color: #555;
    line-height: 1.65;
}

.ia-testimonials .wpr-testimonial-content p:first-child {
    margin-top: 0;
}

.ia-testimonials .wpr-testimonial-content p:last-child {
    margin-bottom: 0;
}

.ia-testimonials .wpr-testimonial-image img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}

.ia-testimonials .wpr-testimonial-arrow-container {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.ia-testimonials .wpr-testimonial-arrow {
    appearance: none;
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #333;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 25px;
    line-height: 34px;
    cursor: pointer;
    padding: 0;
}

.ia-testimonials .wpr-testimonial-arrow:hover {
    border-color: #e9a6bc;
    color: #ad5977;
}

.ia-testimonials .wpr-testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
}

.ia-testimonials .wpr-testimonial-dots button {
    appearance: none;
    border: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    padding: 0;
    background: #cfcfcf;
    cursor: pointer;
}

.ia-testimonials .wpr-testimonial-dots button.is-active {
    background: #e9a6bc;
}

/* Article grid */
.ia-grid-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0 0 28px;
}

.ia-grid-filters button {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 4px 0;
    color: #555;
    cursor: pointer;
    font: inherit;
}

.ia-grid-filters button:hover,
.ia-grid-filters button.is-active {
    color: #ad5977;
}

.ia-post-grid {
    display: grid;
    grid-template-columns: repeat(var(--ia-grid-columns, 3), minmax(0, 1fr));
    gap: 34px 28px;
}

.ia-post-card {
    min-width: 0;
}

.ia-post-image {
    display: block;
    overflow: hidden;
    margin-bottom: 15px;
}

.ia-post-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1.35 / 1;
    object-fit: cover;
    transition: transform .3s ease;
}

.ia-post-image:hover img {
    transform: scale(1.02);
}

.ia-post-categories {
    font-size: 12px;
    margin-bottom: 7px;
    color: #777;
}

.ia-post-categories a {
    color: inherit;
}

.ia-post-title {
    font-size: 20px;
    line-height: 1.35;
    margin: 0 0 10px;
}

.ia-post-title a {
    color: inherit;
}

.ia-post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.ia-read-more {
    font-size: 14px;
}

.ia-post-card[hidden],
.ia-product-grid-item[hidden] {
    display: none !important;
}

/* Woo grid: keep Dr. Leigh/WooCommerce product-card styling. */
.ia-product-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--ia-product-columns, 4), minmax(0, 1fr)) !important;
    gap: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ia-product-grid > .ia-product-grid-item,
.ia-product-grid > .product {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    list-style: none !important;
}

@media (max-width: 1024px) {
    .ia-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ia-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 680px) {
    .ia-post-grid,
    .ia-product-grid {
        grid-template-columns: 1fr !important;
    }

    .ia-ba .wpr-ba-label {
        top: 10px;
    }

    .ia-ba .wpr-ba-label-1 {
        left: 10px;
    }

    .ia-ba .wpr-ba-label-2 {
        right: 10px;
    }
}
