/* ============================================
   CSS VARIABLES - Feralism Design System
   ============================================ */
:root {
    /* Main colors */
    --black-deep: #0d0d0d;
    --black-standard: #1a1a1a;
    --charcoal: #1a1a1a;
    --dark-gray: #333333;
    --medium-gray: #595959;  /* Improved for WCAG AA */
    --gray: #767676;          /* Improved for WCAG AA */
    --light-gray: #CCCCCC;
    --pale-gray: #E5E5E5;
    --off-white: #f8f6f0;
    --white-pure: #FFFFFF;

    /* Gold palette */
    --gold-primary: #d4af37;
    --gold-pale: #f4e4c1;
    --gold-darker: #b8941f;
    --gold: #B8860B;
    --gold-dark: #9B7209;
    --gold-light: #D4A637;
}

/* Base Reset Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f5f5;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.main-content {
    padding: 0;
    background-color: white;
    background-image: linear-gradient(rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.05));
    flex: 1;
    max-width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
    margin-top: 10px; /* Add space for fixed header */
}

/* Logo Container */
.logo-container {
    overflow: hidden;
    line-height: 0;
    display: inline-block;
}

.project-logo {
    height: 67px;
    margin-left: 10px;
}

.top-fixed-container {
    top: 0;
    left: 0;
    right: 0;
    background: #000;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /*! background-image: linear-gradient(rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.1)); */
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
     /* Increased padding */
    width: 100%;
    background-color: #000;
     /* Set a fixed height for the header */
    background-image: linear-gradient(rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.1));
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding-right: 15px;
    min-width: 50px;
}

/* Account icon in header */
.account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-left: 15px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.account-icon:hover {
    transform: scale(1.1);
}

.account-icon-image {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: block;
}

@media screen and (max-width: 600px) {
    .account-icon-image {
        height: 35px;
        width: 35px;
    }
}

.account-icon-symbol {
    font-size: 2rem;
    display: inline-block;
    padding: 10px;
    color: white;
}

/* Navbar action buttons */
.navbar-btn {
    padding: 6px 16px;
    border-radius: 18px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 12px;
    display: inline-block;
}

.navbar-btn-primary {
    background: var(--gold-primary);
    color: var(--black-deep);
}

.navbar-btn-primary:hover {
    background: var(--gold-darker);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

.navbar-btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

@media screen and (max-width: 1024px) {
    .navbar-btn {
        display: none;
    }
}

/* Mobile menu buttons - hide on desktop */
.navbar_base .mobile-only-menu-item {
    display: none;
    list-style: none;
}

@media screen and (max-width: 1024px) {
    .navbar_base .mobile-only-menu-item {
        display: block;
        margin: 10px 0;
        padding: 0 15px;
    }
}

.mobile-menu-btn {
    display: block;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.mobile-menu-btn-primary {
    background: var(--gold-primary);
    color: var(--black-deep);
}

.mobile-menu-btn-primary:hover {
    background: var(--gold-darker);
    transform: scale(1.02);
}

.mobile-menu-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.mobile-menu-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Account section grouping */
.account-section {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 15px;
}

.account-section .navbar-btn {
    margin-right: 0;
}

.project-title {
    color: #f5f5f5; /* Light grey */
    margin-bottom: 0;
    font-family: 'Green Klay', serif;
}

/* Search Form */
.search-form {
    flex-grow: 1;
    margin: 0 20px;
    position: relative;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 10px 40px 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    background-image: linear-gradient(rgba(170, 211, 230, 0.1), rgba(170, 211, 230, 0.1));
}

.search-form input[type="search"]:focus {
    outline: none;
    background-color: #e0e0e0;
}

.search-form button[type="submit"] {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    transition: color 0.3s ease;
}

.search-form button[type="submit"]:hover {
    color: #333;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
}

.search-suggestions li {
    padding: 10px;
    cursor: pointer;
}

.search-suggestions li:hover {
    background-color: #f5f5f5;
}

/* User Controls */
.user-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
}

.cart-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-icon img {
    height: 55px;
    width: 55px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cart-icon-wrapper {
    position: relative;
    display: inline-block;
}

.cart-count {
    position: absolute;
    top: -12px;
    right: -12px;
    background-color: #ff0000;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    padding: 6px;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: bounce 0.5s ease-in-out;
}

/* CSS-only mobile menu */
.mobile-menu-checkbox {
    display: none; /* Hide the checkbox */
}

.mobile-menu-button {
    display: none; /* Hide by default, show in mobile */
    cursor: pointer;
    position: relative;
    z-index: 1000;
    margin-right: 8px;
}

/* Animation for mobile sidebar reveal */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animation for navbar expansion */
@keyframes expandDown {
    from {
        max-height: 0;
        opacity: 0.3;
    }
    to {
        max-height: 1500px;
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.menu-bar {
    display: block;
    width: 22px;
    height: 2.5px;
    background-color: #fff;
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* When checkbox is checked, transform bars into X */
.mobile-menu-checkbox:checked ~ .project-header .mobile-menu-button .menu-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.mobile-menu-checkbox:checked ~ .project-header .mobile-menu-button .menu-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-checkbox:checked ~ .project-header .mobile-menu-button .menu-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Nav is always visible by default, controlled by checkbox on mobile */
.mobile-menu-checkbox:checked ~ .project-header .navbar_base {
    max-height: 1500px !important; /* A large value to accommodate all menu items */
    opacity: 1 !important;
    visibility: visible !important;
    animation: slideIn 0.3s ease-out forwards;
    transform: translateY(0) !important;
}

/* Navigation Bar */
.navbar_base {
    z-index: 10;
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 15px;
    margin-left: 211px;
    transition: max-height 0.3s ease;
    padding: 0 10px;
}

/* SVG category icons */
.category-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    stroke: currentColor;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Legacy image support (if any still exist) */
.navbar_base > ul > li > a > img {
    display: block;
    margin: auto;
    max-width: 20px;
    max-height: 20px;
    margin-bottom: 3px;
    filter: brightness(0) invert(1); /* Makes icons white */
}

.navbar_base.retracted {
    max-height: 0; /* Retracted state */
    overflow: hidden;
}

.navbar_base ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.navbar_base li {
    position: relative;
    display: inline-block;
    margin: 0;
}

.navbar_base li a {
    display: flex;
    align-items: center;
    text-align: center;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.3s, color 0.3s;
    color: #fff;
    width: auto;
    white-space: nowrap;
}

.navbar_base li a:hover {
    background-color: #483c10; /* Darker gold */
    /*! color: #fff; */ /* Light grey */
}

/* Old image-based category icons - kept for backwards compatibility */
.navbar_base img.category-image {
    max-width: 18px;
    max-height: 18px;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
    filter: brightness(0) invert(1); /* Makes icons white */
}

/* Dropdown */
.dropdown {
    display: block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    min-width: 200px;
    width: 100%;
    z-index: 1000;
    border-radius: 10px;
    background-color: #f5f5f5;
    background-image: linear-gradient(rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.1));
}

.navbar li:hover > .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
}

.dropdown-content a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 8px 12px;
    width: 100%;
}

.dropdown-content a:hover {
    background-color: #e0e0e0; /* Light grey */
}

.dropdown-content img.category-image {
    margin-right: 0;
    object-fit: contain;
}

.dropdown-content a {
    justify-content: flex-start;
}

.dropdown-content li {
    display: block;
    width: 100%;
    clear: both;
    border-radius: 10px;
    background-color: #f5f5f5;
}

.dropdown-content .dropdown-content {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    width: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.dropdown-content li:hover > .dropdown-content {
    display: block;
}

/* Sidebar */
.sidebar {
    position: absolute;
    right: -75%;
    opacity: 0;
    z-index: 100;
    width: 350px;
    background-color: #f5f5f5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    transition: all 1s ease;
    background-image: linear-gradient(rgba(212, 175, 55, 0.1),rgba(212, 175, 55, 0.1));
}

.account-checkbox {
    display: none;
}

.account-checkbox:checked ~ .sidebar {
    right: 0;
    opacity: 1;
}

/* Removed duplicate account-icon styles - consolidated at top of file */

/* User Info */
.info {
    text-align: center;
    margin-bottom: 15px;
}

.user-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #d4af37; /* Gold */
}

.username {
    font-size: 20px;
    font-weight: bold;
}

/* User Actions */
.user-actions {
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin-top: 20px;
}

.item-sm:hover {
    background-color: #e0c75e; /* Darker light gold */
}

.item-sm img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.item-sm span {
    color: #333; /* Dark grey */
    font-size: 15px;
    font-weight: bold;
}

/* Grid Container for Links */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
    padding: 10px;
}

.item:hover {
    background-color: #f0e68c; /* Light gold */
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.icon {
    width: 24px;
    height: 24px;
    background-size: cover;
}

.icon-truck, .icon-smile, .icon-news, .icon-building, .icon-cart {
    /* Removed placeholder image reference to prevent 404 errors */
    background-color: #e0e0e0;
}

/* Server-side Message Container */
.server-message-container {
    max-width: 50%;
    margin: auto;
    margin-top: auto;
    margin-bottom: auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-image: linear-gradient(rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.05));
    margin-top: 30px;
    margin-bottom: 30px;
}

.alert {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.update-success-container {
    margin-top: 10px;
}

.success-message-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.success-details-list {
    margin-left: 20px;
}

/* Base Styles for Sidebar */

.account-section.hover-container {
    position: relative; /* This will contain the absolute sidebar */
    /* Add more styles as needed, such as width, padding, etc. */
}

.account-section.hover-container .sidebar {
    position: absolute;
    right: -83%;
    display: none; /* Sidebar initially hidden */
     /* Positioning relative to its container */
     /* Background color of sidebar */
    /*! color: #fff; */ /* Text color */
    width: 430px; /* Width of sidebar */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Shadow for sidebar */
    padding: 15px; /* Padding inside sidebar */
    z-index: 100;
    background-color: #f5f5f5;
    background-image: linear-gradient(rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.1));
}

.account-section.hover-container:hover .sidebar {
    display: block; /* Show sidebar on hover */
}

/* Ensure the link style is applied to the entire flex container */
.account-link {
    color: inherit;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.flex {
     /* Align items vertically in the center */
     /* Center items horizontally */
    gap: 10px;
    border-radius: 8px; /* Add border-radius for rounded corners */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effects */
    cursor: pointer; /* Pointer cursor on hover */
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Inherit text color */
}

/* Hover effect for flex container */
.flex:hover {
    background-color: #e0e0e0; /* Light grey background on hover */
}

/* Spacing between items */
.space-x-2 > * + * {
    margin-left: 8px; /* Adjust the spacing as needed */
}

/* Style for each item */
.item-sm {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.icon-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    padding: -4px;
    border-radius: 100px;
    /*! background-color: #ae1313; */
}

/* Specific styles for smaller icons */
.icon-small {
    width: 25%;
} 

.icon-wrapper img {
    max-width: 100%; /* Ensure the image doesn't exceed the container */
    max-height: 100%;
    object-fit: contain; /* This will ensure aspect ratio is maintained */
}

/* Style for orders and assistance */
.order-assistance-section .item {
    background-color: #dff0d8; /* Light green background */
}

.order-assistance-section .item:hover {
    background-color: #c8e6c9; /* Darker green on hover */
}

/* Provider section styles */
.provider-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    padding: 10px;
    background-color: #fffacd; /* LemonChiffon background */
}

/* Specific styles for smaller icons in the provider section */
.provider-section .icon-small {
    width: 25%;
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 10px; /* Space between icon and text */
}

.provider-section p {
    margin: 0; /* Remove default paragraph margin */
    color: #333; /* Dark grey text color */
    font-size: 14px; /* Adjust font size as needed */
    font-weight: bold; /* Make the text bold */
}

/* Optional: Add any additional hover effects */
.provider-section:hover p {
    color: #000; /* Change text color on hover */
}

.icon-messages {
    /*! width: auto; */  /* Adjust width as necessary */
    height: 60%;  /* Adjust height to make it smaller than the container */
    max-width: 100%; /* Ensure it doesn't exceed the container */
    max-height: 100%;
    object-fit: contain; /* Maintain aspect ratio */
}

.item-title {
    text-align: center;
    /* Ensure titles align horizontally regardless of icon size */
    height: auto; /* Adjust height to give enough space for any title */
    padding: 4px;
    border-radius: 10px;
}

/* Add hover effect for the item title */
.item-sm:hover .item-title {
    background-color: #aad3e6; /* Change background color on hover */
    color: #fff; /* Change text color on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a shadow effect on hover */
    transform: scale(1.05); /* Slightly scale up the title on hover */
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for the hover effect */
}

.item-sm span {
    display: inline-block;
     /* Adjust spacing as needed */
    text-align: center; /* Align with the icon */
}

/* Add hover effect for the icon wrapper */
.item-sm:hover .icon-wrapper {
    background-color: #aad3e6; /* Change background color on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a shadow effect on hover */
    transform: scale(1.05); /* Slightly scale up the icon on hover */
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for the hover effect */
    background-image: linear-gradient(rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.1));
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.icon-messages {
    animation: pulse 1s infinite;
    /* Add more styles as needed */
}

@keyframes ping {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50%, 100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.ping-indicator {
  --tw-bg-opacity: 1;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
  background-color: rgba(212, 175, 55, var(--tw-bg-opacity)); /* Updated color */
  border-radius: 9999px;
  height: 1rem;
  width: 1rem;
  position: absolute;
  left: 0.50px;
  top: 0.90px;
}

/* Home Link Styles */
.sidebar .homelink {
    margin-bottom: 20px; /* Spacing below home link */
}

.sidebar .grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Create two columns */
     /* Space between grid items */
}

/* Icon Styles */
.sidebar .icon {
    display: inline-block;
    width: 32px; /* Icon width */
    height: 32px; /* Icon height */
    background-size: cover; /* Ensure the icon covers the area */
    margin-right: 8px; /* Spacing after icons */
}

/* Text and Link Styles */

.sidebar {
    display: flex;
    flex-direction: column;
}

.info {
    margin-bottom: 20px; /* Adjust spacing as needed */
}

.item {
    display: flex;
    align-items: center; /* Align icon and text vertically */
    gap: 10px; /* Space between icon and text */
}

.icon {
    /* Icon styles */
    width: 24px; /* Example size, adjust as needed */
    height: 24px; /* Example size, adjust as needed */
    background-size: cover;
}

.item p {
    margin: 0; /* Remove default paragraph margins */
}

.sidebar a, .sidebar p {
     /* White text for readability */
    text-decoration: none; /* No underlines on links */
}

/* Wallet Section Styles */
.wallet-section {
    padding: 20px;
}

.wallet-grid {
    display: flex;
    flex-wrap: nowrap; /* Ensure wallets stay side by side */
    gap: 20px;
}

.wallet-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    max-width: 48%; /* Adjust to ensure two cards per row */
    box-sizing: border-box;
}

.wallet-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.crypto-logo {
}

/* Specific styles for BTC logo */
.crypto-logo-btc {
    width: 130px;
    height: 40px;
    object-fit: contain;
}

/* Specific styles for KASPA logo */
.crypto-logo-kas {
    width: 295px;
    height: auto;
    object-fit: contain;
    margin-top: -9px;
    margin-bottom: -16px;
}

.wallet-balance {
    margin-bottom: 15px;
}

.wallet-balance p {
    margin: 5px 0;
}

.wallet-actions {
    display: flex;
    gap: 10px;
}

.wallet-action-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    background-color: #007bff; /* Customize button color */
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.wallet-action-btn:hover {
    background-color: #0056b3;
}

/* Responsive Design: Adjust layout on smaller screens */
@media (max-width: 768px) {
    .wallet-grid {
        flex-direction: column;
    }
    .wallet-card {
        max-width: 100%;
    }
}

/* Hover effects for interactive items */
.sidebar a:hover {
    /*! color: #aad3e6; */ /* Light blue hover effect */
}

/* Small info section */
.sidebar .info-sm {
    display: none; /* Initially hidden */
}

/* Show small info section on larger screens */
@media (min-width: 768px) {
    .sidebar .info-sm {
        display: block;
    }
}

/* Animation for icons */
@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Applying animation to notification and message icons */
.sidebar .icon-bell, .sidebar .icon-messages {
    animation: iconBounce 1s ease-in-out infinite;
}

/* Specific hover styles */
.account-icon:hover + .sidebar {
    display: block; /* Show sidebar when hovering over account icon */
}

/* Responsive Design: Adjusting the width of the sidebar for larger screens */
@media (min-width: 768px) {
.sidebar {
width: 300px; /* Larger sidebar for wider screens */
}
}

/* Styles for individual items within the sidebar */
.sidebar .item {
display: flex;
align-items: center;
/*! margin-bottom: 10px; */
padding: 5px;
border-radius: 10px;
transition: background-color 0.3s ease;
background-color: #f5f5f5;
background-image: linear-gradient(rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.1));
}

.sidebar .item:hover {
 /* Dark background for item hover */
border-radius: 10px;
}

.sidebar .utils {
margin-top: 20px;
border-top: 1px solid #444; / Separator line */
padding-top: 10px;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    padding: 1rem;
    text-align: center;
    flex-shrink: 0;
    background-image: linear-gradient(rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.1));
    position: static; /* Ensure footer is not fixed */
}

/* Animations */
@keyframes bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive Styles */

/* Large tablets/small desktops - slightly reduce spacing */
@media screen and (max-width: 1200px) {
    .navbar_base {
        margin-left: 150px;
    }

    .navbar_base li a {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .navbar_base ul {
        gap: 4px;
    }
}

/* Tablets and mobile - use hamburger menu */
@media screen and (max-width: 1024px) {
    /* Show mobile menu button */
    .mobile-menu-button {
        display: block;
    }
    
    /* Project header modifications for mobile */
    .project-header {
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 10px;
        margin-bottom: 0; /* Ensure no bottom margin */
        border-bottom: none; /* Remove any border that might create space */
    }
    
    .header-right {
        order: 2;
        position: absolute;
        right: -10px;
        display: flex;
        align-items: center;
        top: 14px;
    }
    
    /* Navbar base becomes collapsible */
    .navbar_base {
        max-height: 0 !important;
        overflow: hidden !important;
        transition: all 0.4s ease;
        opacity: 0 !important;
        visibility: hidden !important;
        width: 100%;
        position: absolute;
        top: 100%; /* Position directly below header with no gap */
        left: 0;
        background-color: #000;
        padding: 0;
        margin: 0;
        margin-left: 0 !important;
        order: 3;
        flex-basis: 100%;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
        transform: translateY(-10px); /* Start slightly up */
    }
    
    /* Two-column grid for the mobile menu */
    .navbar_base ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
        width: 100%;
    }
    
    .navbar_base li {
        width: 100%;
        display: flex;
        margin: 0;
        border: none;
        animation: fadeIn 0.5s ease-out forwards;
    }
    
    /* Gradient color variation based on position */
    .navbar_base li:nth-child(4n+1) a {
        background-image: linear-gradient(to bottom right, rgba(212, 175, 55, 0.15), rgba(0, 0, 0, 0));
        animation-delay: 0.1s;
    }
    
    .navbar_base li:nth-child(4n+2) a {
        background-image: linear-gradient(to bottom left, rgba(170, 211, 230, 0.15), rgba(0, 0, 0, 0));
        animation-delay: 0.2s;
    }
    
    .navbar_base li:nth-child(4n+3) a {
        background-image: linear-gradient(to top right, rgba(152, 200, 120, 0.15), rgba(0, 0, 0, 0));
        animation-delay: 0.3s;
    }
    
    .navbar_base li:nth-child(4n+4) a {
        background-image: linear-gradient(to top left, rgba(230, 170, 210, 0.15), rgba(0, 0, 0, 0));
        animation-delay: 0.4s;
    }
    
    .navbar_base li a {
        width: 100%;
        height: 100%;
        padding: 12px 8px;
        text-align: center;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        animation: fadeIn 0.5s ease-out forwards;
    }
    
    .navbar_base li a:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    .navbar_base li a img {
        display: block;
        margin: 0 auto 8px;
        max-width: 40px;
        max-height: 40px;
    }
    
    /* Mobile sidebar style improvements */
    .sidebar {
        width: 90%;
        max-width: 350px;
        padding: 15px 10px;
        border-radius: 12px;
        animation: slideIn 0.4s ease-out forwards;
    }
    
    .sidebar .item {
        animation: fadeIn 0.5s ease-out forwards;
    }
    
    /* Two items per row in mobile dropdown */
    .sidebar .grid-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Gradient color variation based on position with staggered animation delays */
    .sidebar .item:nth-child(4n+1) {
        background-image: linear-gradient(to bottom right, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
        animation-delay: 0.1s;
    }
    
    .sidebar .item:nth-child(4n+2) {
        background-image: linear-gradient(to bottom left, rgba(170, 211, 230, 0.15), rgba(170, 211, 230, 0.05));
        animation-delay: 0.2s;
    }
    
    .sidebar .item:nth-child(4n+3) {
        background-image: linear-gradient(to top right, rgba(152, 200, 120, 0.15), rgba(152, 200, 120, 0.05));
        animation-delay: 0.3s;
    }
    
    .sidebar .item:nth-child(4n+4) {
        background-image: linear-gradient(to top left, rgba(230, 170, 210, 0.15), rgba(230, 170, 210, 0.05));
        animation-delay: 0.4s;
    }
    
    /* Logo adjustments */
    .project-logo {
        height: 80px;
        margin-left: 10px;
    }

    /* Main content padding */
    .main-content {
        padding-top: 58px; /* Account for fixed header */
    }
}

@media screen and (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .project-header {
        padding: 0px;
    }
    
    .project-logo {
        height: 70px;
    }

    /* Make alerts more compact */
    .alert {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    /* Further sidebar improvements for small mobile screens */
    .sidebar {
        width: 95%;
        max-width: 320px;
    }
    
    /* Item sizing and styling for mobile */
    .sidebar .item {
        padding: 8px;
        margin-bottom: 5px;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .sidebar .item:hover {
        transform: translateY(-2px);
        box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar .item-sm {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }
    
    .sidebar .item-sm .icon-wrapper {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .sidebar .item-sm span {
        font-size: 13px;
    }
    
    /* Footer adjustments */
    footer {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Typography */
h1 {
    color: #333;
    margin-bottom: 20px;
}

h2 {
    /* Gold */
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

h3 {
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

p {
    color: #333;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

a {
    text-decoration: none;
    color: #333; /* Dark grey */
    font-family: Arial, sans-serif;
}

a:hover {
    /*! color: #b3962f; */ /* Darker gold */
}

/* ===========================================
   E-INK & ACCESSIBILITY OPTIMIZATIONS
   =========================================== */

/* High contrast mode */
@media (prefers-contrast: high) {
  /* Remove all gradient overlays */
  .main-content,
  .project-header,
  .top-fixed-container,
  .dropdown-content,
  .sidebar,
  .sidebar .item,
  footer,
  .server-message-container,
  .search-form input[type="search"],
  .account-section.hover-container .sidebar {
    background-image: none !important;
  }

  /* Solid backgrounds instead of gradients */
  .main-content {
    background-color: #ffffff !important;
  }

  .project-header,
  .top-fixed-container {
    background-color: #000000 !important;
  }

  .sidebar,
  .sidebar .item {
    background-color: #f5f5f5 !important;
  }
}

/* E-ink optimized mode */
@media (prefers-contrast: more),
       (prefers-reduced-motion: reduce) {

  /* Disable all animations */
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  /* Remove gradients - they dither on e-ink */
  .main-content,
  .project-header,
  .dropdown-content,
  .sidebar,
  .sidebar .item,
  footer,
  .navbar_base li a,
  .account-section.hover-container .sidebar {
    background-image: none !important;
  }

  /* Remove shadows */
  .top-fixed-container,
  .dropdown-content,
  .cart-count,
  .account-icon-image,
  .navbar-btn-primary:hover,
  .sidebar,
  .wallet-card {
    box-shadow: none !important;
  }

  /* Remove transforms */
  .account-icon:hover,
  .cart-icon:hover,
  .navbar-btn-primary:hover,
  .navbar-btn-secondary:hover,
  .mobile-menu-btn-primary:hover,
  .item:hover,
  .sidebar .item:hover,
  .navbar_base li a:hover {
    transform: none !important;
  }

  /* Use borders instead of shadows for depth */
  .card,
  .sidebar,
  .dropdown-content {
    border: 1px solid #333333 !important;
  }

  /* Simplified border radius for e-ink */
  .navbar-btn,
  .mobile-menu-btn,
  .sidebar,
  .dropdown-content,
  .navbar_base li a {
    border-radius: 4px !important;
  }

  /* Ensure cart count is visible without animation */
  .cart-count {
    animation: none !important;
    background-color: #000000 !important;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .icon-messages,
  .ping-indicator,
  .cart-count {
    animation: none !important;
  }

  .menu-bar {
    transition: none !important;
  }

  /* Static mobile menu animations */
  .mobile-menu-checkbox:checked ~ .project-header .navbar_base {
    animation: none !important;
  }
}
