/**
 * Custom Theme Styles - Bluesky Dukamarket Custom
 * Footer column layout fix and newsletter redesign
 */

/* ========================================
   FOOTER COLUMN LAYOUT FIX
   ======================================== */

/* Desktop: Force horizontal layout for footer columns */
@media (min-width: 1024px) {
    .page-footer .footer-static_link.footer-columns-5 {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 2rem;
        align-items: flex-start;
    }

    .page-footer .footer-static_link .footer-links {
        display: block;
        flex-shrink: 0;
    }

    .page-footer .footer-column-store-info {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .page-footer .footer-column-info {
        flex: 0 0 12.5%;
        max-width: 12.5%;
    }

    .page-footer .footer-column-policy {
        flex: 0 0 12.5%;
        max-width: 12.5%;
    }

    .page-footer .footer-column-help {
        flex: 0 0 12.5%;
        max-width: 12.5%;
    }

    .page-footer .footer-column-app {
        flex: 0 0 23.5%;
        max-width: 23.5%;
    }
}

/* Large Desktop: Wider spacing */
@media (min-width: 1280px) {
    .page-footer .footer-static_link.footer-columns-5 {
        gap: 3rem;
    }
}

/* Tablet: 2-3 column wrap layout */
@media (max-width: 1023px) and (min-width: 768px) {
    .page-footer .footer-static_link.footer-columns-5 {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
    }

    .page-footer .footer-column-store-info,
    .page-footer .footer-column-app {
        flex: 0 0 48%;
        max-width: 48%;
    }

    .page-footer .footer-column-info,
    .page-footer .footer-column-policy,
    .page-footer .footer-column-help {
        flex: 0 0 30%;
        max-width: 30%;
    }
}

/* Mobile: Stack vertically */
@media (max-width: 767px) {
    .page-footer .footer-static_link.footer-columns-5 {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .page-footer .footer-links {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1.5rem;
    }
}

/* ========================================
   NEWSLETTER SIGNUP REDESIGN
   ======================================== */

/* Desktop & Tablet: Horizontal layout with icon */
@media (min-width: 768px) {
    .page-footer .block-newsletter-form {
        padding: 3rem 0;
    }

    .page-footer .block-newsletter-form .content {
        position: relative;
    }

    .page-footer .block-newsletter-form .form.subscribe {
        max-width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
        justify-content: center;
        position: relative;
    }

    /* Hide original newsletter title to avoid duplication */
    .page-footer .block-newsletter-form .rokan-title {
        display: none !important;
    }

    /* Icon - send icon from icon-dukamarket font */
    .page-footer .block-newsletter-form .form.subscribe::before {
        content: "\e9ee";
        font-family: 'icon-dukamarket';
        font-size: 3rem;
        color: #ffffff;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 4rem;
        height: 4rem;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        order: 0;
    }

    /* Text - "Sign up for newsletter" */
    .page-footer .block-newsletter-form .form.subscribe::after {
        content: "Sign up for newsletter";
        font-size: 1.6rem;
        font-weight: 500;
        color: #ffffff;
        white-space: nowrap;
        flex-shrink: 0;
        order: 1;
    }

    /* Field container - direct child of flex container */
    .page-footer .block-newsletter-form .form.subscribe .field.newsletter {
        order: 2;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        flex: 1;
        max-width: 500px;
    }

    /* Hide the label that contains "Sign Up for Our Newsletter:" */
    .page-footer .block-newsletter-form .form.subscribe .field.newsletter .label {
        display: none !important;
    }

    /* Control wrapper */
    .page-footer .block-newsletter-form .form.subscribe .control {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        flex: 1;
    }

    /* Input field wrapper */
    .page-footer .block-newsletter-form .form.subscribe .input-focus {
        flex: 1;
        margin: 0;
        position: relative;
        display: flex;
        align-items: center;
    }

    .page-footer .block-newsletter-form .form.subscribe .input-focus input {
        width: 100%;
        height: 4.5rem;
        border: 1px solid #ddd;
        background-color: #ffffff;
        color: #000000;
        padding: 0 12rem 0 2rem;
        border-radius: 5px;
        font-size: 1.4rem;
        flex: 1;
    }

    .page-footer .block-newsletter-form .form.subscribe .input-focus input::placeholder {
        color: #999999;
        opacity: 1;
    }

    .page-footer .block-newsletter-form .form.subscribe .input-focus input:focus {
        border-color: #222f3e;
        outline: none;
    }

    /* Submit button */
    .page-footer .block-newsletter-form .form.subscribe .actions {
        margin: 0;
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .page-footer .block-newsletter-form .form.subscribe .actions .action {
        height: 3.5rem;
        padding: 0 2rem;
        background-color: #222f3e;
        color: #ffffff;
        border: none;
        border-radius: 5px;
        font-size: 1.4rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .page-footer .block-newsletter-form .form.subscribe .actions .action:hover {
        background-color: #1a2533;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(34, 47, 62, 0.3);
    }

    /* Remove parent theme's border decoration */
    .page-footer .block-newsletter-form .content::before {
        display: none !important;
    }
}

/* Tablet: Adjust spacing */
@media (max-width: 1023px) and (min-width: 768px) {
    .page-footer .block-newsletter-form .form.subscribe {
        gap: 1rem;
    }

    .page-footer .block-newsletter-form .form.subscribe::before {
        font-size: 2.5rem;
        width: 3.5rem;
        height: 3.5rem;
    }

    .page-footer .block-newsletter-form .form.subscribe::after {
        font-size: 1.4rem;
    }

    .page-footer .block-newsletter-form .form.subscribe .field.newsletter {
        max-width: 350px;
    }
}

/* Mobile: Stack vertically */
@media (max-width: 767px) {
    .page-footer .block-newsletter-form {
        padding: 2rem 0;
    }

    .page-footer .block-newsletter-form .form.subscribe {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .page-footer .block-newsletter-form .form.subscribe::before {
        content: "\e9ee";
        font-family: 'icon-dukamarket';
        font-size: 4rem;
        color: #ffffff;
        display: block;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        order: 0;
    }

    /* Hide "Sign up for newsletter" text on mobile */
    .page-footer .block-newsletter-form .form.subscribe::after {
        content: "";
        display: none;
    }

    /* Field container - direct child of flex container */
    .page-footer .block-newsletter-form .form.subscribe .field.newsletter {
        order: 2;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Hide the label */
    .page-footer .block-newsletter-form .form.subscribe .field.newsletter .label {
        display: none !important;
    }

    /* Control wrapper */
    .page-footer .block-newsletter-form .form.subscribe .control {
        width: 100%;
    }

    .page-footer .block-newsletter-form .form.subscribe .input-focus {
        width: 100%;
        position: relative;
        display: flex;
        align-items: center;
    }

    .page-footer .block-newsletter-form .form.subscribe .input-focus input {
        width: 100%;
        height: 4.5rem;
        border: 1px solid #ddd;
        background-color: #ffffff;
        color: #000000;
        padding: 0 11rem 0 1.5rem;
        border-radius: 2.5rem;
        font-size: 1.4rem;
        flex: 1;
    }

    .page-footer .block-newsletter-form .form.subscribe .actions {
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .page-footer .block-newsletter-form .form.subscribe .actions .action {
        height: 3.5rem;
        padding: 0 1.5rem;
        background-color: #222f3e;
        color: #ffffff;
        border: none;
        border-radius: 2.5rem;
        font-size: 1.3rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .page-footer .block-newsletter-form .content::before {
        display: none !important;
    }
}

/* ========================================
   MOBILE FOOTER FIXES
   ======================================== */

@media only screen and (max-width: 767px) {
    /* Remove dark background colors from footer elements */
    .page-footer .container-inner .footer-static_link .footer-links {
        background-color: transparent !important;
        margin: 5px 0;
        padding: 0 2rem;
        border-radius: 2px;
    }

    .page-footer .footer-static_link .footer-links .footer-title,
    .page-footer .footer-static_link .footer-links .rokan-title .module-title {
        font-size: 1.6rem;
        background-color: transparent !important;
        margin: 0;
        padding: 1.5rem 0;
        border-radius: 2px;
        pointer-events: auto !important;
        position: relative;
        display: block;
        text-decoration: none;
        cursor: pointer;
    }
}

/* ========================================
   FIX FOOTER DROPDOWN/ACCORDION ON MOBILE
   ======================================== */

@media only screen and (max-width: 767px) {
    /* Ensure footer titles are clickable and have proper cursor */
    .page-footer .footer-links .footer-title,
    .page-footer .footer-links .rokan-title,
    .page-footer .footer-links .block-title {
        cursor: pointer !important;
        pointer-events: auto !important;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Add arrow indicator for collapsible sections */
    .page-footer .footer-links .footer-title:after,
    .page-footer .footer-links .rokan-title .module-title:after,
    .page-footer .footer-links .block-title:after {
        content: '\25BC';
        float: right;
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }

    /* Rotate arrow when expanded */
    .page-footer .footer-links.active .footer-title:after,
    .page-footer .footer-links.active .rokan-title .module-title:after,
    .page-footer .footer-links.active .block-title:after {
        transform: rotate(180deg);
    }

    /* Initially hide footer content on mobile */
    .page-footer .footer-links .footer-content,
    .page-footer .footer-links ul,
    .page-footer .footer-links .links,
    .page-footer .footer-links .content {
        display: none;
        overflow: hidden;
    }

    /* Show content when active */
    .page-footer .footer-links.active .footer-content,
    .page-footer .footer-links.active ul,
    .page-footer .footer-links.active .links,
    .page-footer .footer-links.active .content {
        display: block;
    }

    /* Always show column 1 (store info) content - don't collapse */
    .page-footer .footer-column-store-info .footer-content,
    .page-footer .footer-column-store-info ul,
    .page-footer .footer-column-store-info .links,
    .page-footer .footer-column-store-info .content {
        display: block !important;
    }

    /* Remove arrow from always-visible column */
    .page-footer .footer-column-store-info .footer-title:after,
    .page-footer .footer-column-store-info .rokan-title .module-title:after {
        display: none;
    }
}

/* ========================================
   BREADCRUMBS VERTICAL LAYOUT
   ======================================== */

/* Full-width breadcrumbs container with white background */
.breadcrumbs {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background-color: #ffffff !important;
}

.breadcrumbs .items {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center;
    font-size: 1.5em !important;
}

/* Override parent theme's inline-block display */
.breadcrumbs .items > li,
.breadcrumbs .items .item {
    display: block !important;
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Remove all icon font separators from parent theme */
.breadcrumbs .items .item::after {
    content: none !important;
    display: none !important;
}

/* Add backslash separator at END of each line (except last item) */
.breadcrumbs .items .item:not(:last-child)::after {
    content: '\\' !important;
    display: inline-block !important;
    margin-left: 0.5rem;
    font-family: inherit !important;
    font-size: inherit;
    color: inherit;
    font-weight: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure links and text maintain center alignment */
.breadcrumbs .items .item a,
.breadcrumbs .items .item strong {
    display: inline;
    text-align: center;
}

/* ========================================
   HEADER USER ICON STYLING
   ======================================== */

/* Make header user icon bigger and white */
.header [class^="icon-"],
.header [class*=" icon-"] {
    font-family: 'icon-dukamarket';
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 30px;
    color: white;
    margin-right: 10px;
}
