/* General Reset */
* {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background-color: #eef0f3;
}

/* Header Bar */
header {
    width: 100%;
    background-color: #fff;
    padding: 15px 20px;
    font-size: 22px;
    font-weight: 600;
    font-family: 'Kanit', sans-serif;
    border-bottom: 1px solid #ddd;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

/* Header Left Side */
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Header Right Menu */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-item {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.menu-item:hover {
    color: #007bff;
}

/* User Icon */
.user-icon {
    width: 28px;
    height: 28px;
    cursor: pointer;
}

/* SVG Icon Styling */
.header-icon {
    width: 28px;
    height: 28px;
    fill: #007bff; /* Blue color */
}

/* Map Page Specific Styles */

/* Map Container - Make it specific to the map section */
.map-section {
    display: flex;
    flex-direction: row;
    gap: 32px;
    background: #eef0f3;
    padding: 32px 24px;
    min-height: 80vh;
    position: relative;
}

.left-container {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 350px;
}

#map {
    width: 100%;
    height: 50em;
    background: #f5f5f5;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    position: relative;
}

.right-container {
    width: 450px;
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#cart {
    position: static;
    width: 100%;
    max-width: 100%;
    margin: 0;
    top: unset;
    right: unset;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-radius: 12px;
}

.cart-inner {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Cart List Container */
#cart-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: calc(100% - 250px);
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scroll */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Webkit scrollbar styling */
#cart-list::-webkit-scrollbar {
    width: 6px;
}

#cart-list::-webkit-scrollbar-track {
    background: transparent;
}

#cart-list::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

/* Payment options container */
.payment-options {
    margin-top: 16px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

/* Make sure the payment section stays visible */
.payment-panel {
    padding: 16px 0;
}

/* Ensure buttons are always visible */
.action-button {
    position: relative;
    z-index: 1001;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 45px;  /* Make space for the slashes */
    width: 100%;        /* Ensure item takes full width */
    box-sizing: border-box; /* Include padding in width calculation */
}

.cart-item::before {
    content: "///";
    position: absolute;
    left: 16px;
    color: #ff3b30;
    font-weight: 600;
    font-family: monospace;
    font-size: 14px;
    opacity: 0.8;
}

.cart-item:hover {
    background-color: #f1f3f5;
    transform: translateX(2px);
}

.cart-item-info {
    flex-grow: 1;
    margin-right: 12px;
    min-width: 0; /* Allow text to shrink */
}

.cart-item-title {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis for long text */
}

.cart-item-price {
    color: #666;
    font-size: 0.9em;
}

/* Remove Button Styling */
.remove-item {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: sans-serif; /* Ensure consistent cross symbol */
    min-width: 24px;
    height: 24px;
}

.remove-item:hover {
    color: #94a3b8;
    background-color: #e2e8f0;
}

.remove-item::before {
    content: "×";
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
}

/* Total and Clear Cart Styling */
#total-cost {
    margin-top: 16px;
    padding-top: 16px;
    font-weight: 600;
    color: #2c3e50;
}

#square-count {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

#clear-cart-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
    padding: 8px;
    transition: color 0.2s ease;
}

#clear-cart-link:hover {
    color: #64748b;
}

/* Mint Button */
#mint-button {
    margin-top: 15px;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s ease;
}

#mint-button:hover {
    background-color: #0056b3;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    z-index: 1000;
}

.toast.visible {
    visibility: visible;
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 900px) {
    .map-section {
        flex-direction: column;
        gap: 18px;
        padding: 16px 4px;
    }
    .left-container, .right-container {
        max-width: 100%;
        width: 100%;
        min-width: 0;
    }
    #map {
        height: 300px;
    }
    .right-container {
        width: 100%;
        max-width: 100vw;
    }
}

#connect-wallet-button {
    background: linear-gradient(135deg,#2289ff, #2273ff);
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 13px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

#connect-wallet-button:hover {
    background: linear-gradient(135deg, #2289ff, #2273ff);
    transform: scale(1.05);
}

#connect-wallet-button:active {
    transform: scale(0.95);
}

#connect-wallet-button svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* --- Digital Wallet Guide Card Styles (imported from mynfts.css) --- */
.dwg-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 4px 24px rgba(153, 69, 255, 0.07), 0 1.5px 6px rgba(0,0,0,0.04);
    padding: 0 0 32px 0;
    font-family: ui-sans-serif, system-ui, sans-serif;
}
.dwg-header {
    background: linear-gradient(100deg, #bfdbfe 50%, #d4dfee 100%);
    border-radius: 10px 10px 0 0 !important;
    padding: 36px 36px 18px 36px;
    text-align: left;
}
.dwg-title {
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #181028;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    margin: 15px 10px 15px 20px;
}

.dwg-header.cart-header {
    padding: 18px 0 15px 0;
    text-align: left;
    border-radius: 0;
}

#cart-empty-message {
  color: #64748b;           /* Font color: change as needed */
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  margin: 30px 0 20px 0;    /* Top and bottom margin: change as needed */
  padding: 12px 0;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px dashed #e5e7eb;
}

/* --- Card Styles --- */
.cart-card {
  background: linear-gradient(135deg, #fdf6e3 0%, #e6f4ea 100%);
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 18px;
  padding: 18px 20px 20px 20px;
  position: relative;
  transition: box-shadow 0.2s;
}
.cart-card.selected {
  box-shadow: 0 4px 20px rgba(0, 123, 255, 0.13);
  border: 2px solid #2289ff;
  background: #f0f7ff;
}

.cart-card-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-card-remove {
  background: none;
  border: none;
  color: #bbb;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 8px;
  transition: color 0.2s;
}
.cart-card-remove:hover {
  color: #e74c3c;
}

/* --- Benefit Styles --- */
.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 0 0;
}
.benefit-card {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border-radius: 10px;
  border: 1.5px solid #f3f4f6;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 10px 12px;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative;
  min-height: 54px;
}
.benefit-card.selected {
  border: 2px solid #2289ff;
  background: #f0f7ff;
  box-shadow: 0 2px 8px rgba(34,137,255,0.08);
}
.benefit-checkbox {
  margin-right: 16px;
  margin-left: 0;
  transform: scale(1.2);
  accent-color: #2289ff;
  cursor: pointer;
  flex-shrink: 0;
}
.benefit-icon {
  font-size: 1.3rem;
  margin-right: 12px;
  margin-top: 2px;
  flex-shrink: 0;
}
.benefit-content {
  flex: 1;
  min-width: 0;
}
.benefit-title {
  font-weight: 600;
  color: #222;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.benefit-badge {
  background: #ffe9b3;
  color: #b58900;
  font-weight: 600;
  border-radius: 8px;
  padding: 2px 10px;
  font-size: 0.95em;
  margin-left: 8px;
  flex-shrink: 0;
}
.benefit-desc {
  color: #666;
  font-size: 0.8em;
  margin-top: 2px;
  word-break: break-word;
}

/* --- Payment Method Buttons --- */
.payment-methods {
  display: flex;
  gap: 10px;
  margin: 18px 0 10px 0;
}
.payment-method-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: 8px;
  border: 1.5px solid #e0e7ef;
  background: #f8fafc;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border 0.2s, color 0.2s;
}
.payment-method-btn.selected {
  background: #2289ff;
  color: #fff;
  border: 2px solid #2289ff;
}

/* --- Cart Totals --- */
.cart-totals {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 18px 0 10px 0;
}

/* --- Clear Cart Button --- */
.clear-cart-btn {
  background: none;
  border: none;
  color: #bbb;
  font-size: 1em;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
  text-align: center;
  transition: color 0.2s;
}
.clear-cart-btn:hover {
  color: #e74c3c;
}

.benefit-summary-card {
  background: #f5f7fa;
  border-radius: 12px;
  padding: 0;
  margin: 14px 0 0 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
  overflow: hidden;
}
.benefit-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 16px 18px 10px 18px;
  background: none;
  border: none;
  outline: none;
}
.benefit-summary-title {
  font-weight: 700;
  font-size: 1.08em;
  color: #222;
}
.benefit-summary-desc {
  color: #555;
  font-size: 0.98em;
  margin-top: 4px;
  margin-bottom: 0;
}
.benefit-summary-chevron {
  font-size: 1.3em;
  color: #2289ff;
  margin-left: 10px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.benefit-summary-card.expanded {
  box-shadow: 0 2px 12px rgba(34,137,255,0.07);
}
.benefit-summary-benefits {
  margin: 0;
  padding: 0 18px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 800px;
  opacity: 1;
  transition: max-height 0.3s cubic-bezier(.4,0,.2,1), opacity 0.2s;
}
.benefit-summary-benefits.collapsed {
  max-height: 0;
  opacity: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.map-header {
  width: 100%;
  background: linear-gradient(100deg, #d4dfee 0%, #bfdbfe 100%);
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 12px 15px 32px;
  margin-bottom: 0;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(34,137,255,0.04);
}

.map-header-content {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.map-header-title {
  color: #111111;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.map-header-subtitle {
  color: #1a1b1a;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0;
}

.view-full-map-btn {
  background: #fff;
  color: #339c7a;
  font-size: 1.25rem;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  padding: 16px 36px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(34,137,255,0.04);
  transition: background 0.2s, color 0.2s;
  margin-left: 32px;
}

.view-full-map-btn:hover {
  background: #eafff6;
  color: #2289ff;
}

@media (max-width: 900px) {
  .map-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 12px 12px 12px;
    border-radius: 18px 18px 0 0;
  }
  .view-full-map-btn {
    margin-left: 0;
    margin-top: 12px;
    width: 100%;
    padding: 14px 0;
    font-size: 1.1rem;
  }
  .map-header-title {
    font-size: 1.3rem;
  }
  .map-header-subtitle {
    font-size: 1rem;
  }
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0 10px 0;
  font-size: 1.18rem;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 18px;
}
.cart-summary-label {
  color: #64748b;
  font-size: 1.08rem;
  font-weight: 500;
}
.cart-summary-value {
  color: #334155;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
