﻿body {
    -webkit-text-size-adjust: 100%;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* Menu active style for items inside .position-sticky.pt-3 */
.position-sticky.pt-3 .nav-link.menu-active {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    line-height: 1.42857143;
    font-size: 16px;
    list-style: none;
    font-family: 'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    text-decoration: none !important;
    transition: border-color .18s, box-shadow .18s, transform .18s, background .18s;
    width: 100%;
    cursor: pointer;
    border-color: #0089ad;
    background: linear-gradient(135deg, #00bcd4 0%, #0089ad 100%);
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(0, 137, 173, .28);
    transform: translateY(-1px);
}

.position-sticky.pt-3 .nav-link.menu-active i {
    color: #fff;
}

/* Alternative active style applied on click */
.position-sticky.pt-3 .nav-link.menu-active-alt {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    line-height: 1.42857143;
    color: #493932 !important;
    font-size: 16px;
    list-style: none;
    font-family: 'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif !important;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    display: flex;
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 320px;
    align-items: center;
    gap: 12px;
}

.position-sticky.pt-3 .nav-link.menu-active-alt i {
    color: #493932 !important;
}

/* Cookie consent banner */
.gf-cookie-consent {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 1100;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 22px rgba(8,17,32,0.12);
    border-radius: 12px;
    overflow: hidden;
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform .18s ease, opacity .18s ease;
    max-width: 520px;
}
.gf-cookie-consent.gf-cookie-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.gf-cookie-inner {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    flex-wrap: nowrap;
}
.gf-cookie-text {
    font-size: 14px;
    color: #333;
    line-height: 1.2;
    flex: 1 1 auto;
    white-space: normal;
}
.gf-cookie-text a { color: #007b8a; text-decoration: underline; }
.gf-cookie-actions { display: flex; gap: 8px; align-items: center; }
.gf-cookie-actions button { flex: 0 0 120px; min-width: 100px; }
.gf-cookie-actions .gf-accept {
    background: linear-gradient(135deg, #00bcd4 0%, #0089ad 100%);
    color: #fff;
    border: 0;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.gf-cookie-actions .gf-decline {
    background: transparent;
    color: #333;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 480px) {
    .gf-cookie-inner { flex-wrap: wrap; }
    .gf-cookie-text { order: 1; width: 100%; margin-bottom: 8px; }
    .gf-cookie-actions { order: 2; width: 100%; justify-content: space-between; }
    .gf-cookie-actions button { flex: 1 1 48%; width: auto; }
}

/* agro-fine look: slightly tighter text and icon spacing */
.gf-cookie-agro .gf-cookie-text { display: inline-flex; align-items: center; gap: 8px; }
.gf-cookie-agro .gf-cookie-text strong { margin-right: 6px; }

/* Agro-fine like cookie-banner classes */
.cookie-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 24px rgba(8,17,32,0.12);
    border-radius: 10px;
    padding: 10px 12px;
    max-width: 520px;
    transition: transform .18s ease, opacity .18s ease;
    opacity: 0;
    transform: translateY(12px);
}
.cookie-banner.visible { opacity: 1; transform: translateY(0); }
.cookie-banner-inner { display: flex; gap: 12px; align-items: center; }
.cookie-banner-text { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #222; }
.cookie-emoji { font-size: 20px; display: inline-block; }
.cookie-copy a { color: #007b8a; text-decoration: underline; }
.cookie-banner-actions { margin-left: auto; display: flex; gap: 8px; }
.cookie-banner-actions .cookie-accept,
.cookie-banner-actions .cookie-decline { padding: 8px 12px; border-radius: 8px; border: none; cursor: pointer; min-width: 110px; }
.cookie-banner-actions .cookie-accept { background: linear-gradient(135deg,#00bcd4 0%,#0089ad 100%); color: #fff; }
.cookie-banner-actions .cookie-decline { background: transparent; border: 1px solid rgba(0,0,0,0.08); color: #222; }

@media (max-width: 480px) {
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; }
    .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 8px; }
    .cookie-banner-actions { margin-left: 0; justify-content: space-between; }
    .cookie-banner-actions .cookie-accept, .cookie-banner-actions .cookie-decline { min-width: auto; flex: 1 1 48%; }
}

/* Match style when the <li> is active (like <li class="active" role="presentation">) */
.position-sticky.pt-3 .nav-item.active > .nav-link,
.position-sticky.pt-3 .nav-link.active {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    line-height: 1.42857143;
    font-size: 16px;
    list-style: none;
    font-family: 'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    text-decoration: none !important;
    transition: border-color .18s, box-shadow .18s, transform .18s, background .18s;
    width: 100%;
    cursor: pointer;
    border-color: #0089ad;
    background: linear-gradient(135deg, #00bcd4 0%, #0089ad 100%);
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(0, 137, 173, .28);
    transform: translateY(-1px);
}

.position-sticky.pt-3 .nav-item.active > .nav-link i,
.position-sticky.pt-3 .nav-link.active i {
    color: #fff !important;
}

@media (max-width: 991.98px) {
    .language-switcher {
        padding: 0.75rem !important;
    }

    .language-switcher .btn-group {
        border-radius: 0.85rem;
        overflow: hidden;
    }

    .language-switcher .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
    }
}

@media (max-width: 767.98px) {
    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    img,
    svg {
        max-width: 100%;
        height: auto;
    }

    .language-switcher {
        padding: 0.65rem !important;
    }

    .language-switcher .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .language-switcher .btn img {
        width: 16px !important;
        height: 16px !important;
        margin-right: 4px !important;
    }

    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .row > [class*="col-"] {
        min-width: 0;
    }

    .login-container {
        width: 100%;
        margin: 5.75rem auto 1.25rem !important;
    }

    .register-card {
        margin-top: 5.25rem !important;
        padding: 1.25rem !important;
    }

    .create-user-card,
    .not-found-card,
    .contact-card {
        padding: 1.25rem !important;
        border-radius: 1rem !important;
    }

    .page-shell {
        padding-top: 5rem !important;
        padding-bottom: 1.25rem !important;
    }

    .not-found-image {
        max-width: 320px !important;
    }

    nav.navbar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .search-shell {
        max-width: none !important;
    }

    .card-header.d-flex,
    .glass-card .card-header.d-flex,
    .create-user-card .d-flex.justify-content-between,
    .contact-card .d-flex.justify-content-between,
    .register-card .d-flex.justify-content-between,
    .not-found-card .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .card-header.d-flex .btn,
    .glass-card .card-header.d-flex .btn,
    .create-user-card .d-flex.justify-content-between .btn,
    .contact-card .d-flex.justify-content-between .btn,
    .register-card .d-flex.justify-content-between .btn,
    .not-found-card .d-flex.justify-content-between .btn {
        width: 100%;
    }

    .input-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .input-group > .form-control,
    .input-group > .form-select,
    .input-group > .input-group-text {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100%;
        border-radius: 0.8rem !important;
    }

    .input-group > .form-control,
    .input-group > .form-select {
        min-height: 46px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .metric-value {
        font-size: 1.4rem !important;
        line-height: 1.15;
        word-break: break-word;
    }

    .product-name-list {
        min-width: 140px !important;
    }

    main.col-md-9,
    main.col-lg-10,
    main[class*="col-md-9"],
    main[class*="col-lg-10"] {
        padding-top: 5rem !important;
    }

    .btn.position-fixed.d-md-none {
        top: 74px !important;
        left: 12px !important;
        border-radius: 999px !important;
        padding: 0.55rem 0.7rem !important;
    }

    .sidebar {
        min-height: auto !important;
        margin-bottom: 1rem;
    }

    .table-responsive {
        border-radius: 0.85rem;
    }

    .table td,
    .table th {
        white-space: nowrap;
    }

    .wa-chat-box {
        width: min(320px, calc(100vw - 2rem)) !important;
    }

    .wa-chat-box-content-send-btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .page-title,
    .not-found-title {
        max-width: 100%;
    }

    .glass-card,
    .card,
    .section-card {
        border-radius: 0.9rem !important;
    }

    .table {
        font-size: 0.92rem;
    }

    .table td,
    .table th {
        padding: 0.65rem 0.55rem;
    }

    .input-group-lg > .form-control,
    .input-group-lg > .input-group-text {
        padding: 0.7rem 0.85rem;
        font-size: 0.95rem;
    }

    .create-user-card .d-flex.gap-2,
    .not-found-card .d-flex.gap-3 {
        flex-direction: column;
    }

    .create-user-card .btn,
    .not-found-card .btn,
    .contact-card .btn,
    .register-card .btn {
        width: 100%;
    }
}



