/* Daisy Chain Color Scheme */
:root {
    --fern: #50723C;
    --electric-rose: #F00699;
    --pacific-blue: #00B2CA;
    --dusk-blue: #1D4E89;
    --pale-amber: #D8DC6A;
}

/* Glassmorphism and Modern Styling */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 3px solid #00B2CA;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

nav.glass-card {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.btn-primary {
    background: #F00699;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 3px solid #1D4E89;
    cursor: pointer;
    box-shadow: 4px 4px 0px #1D4E89;
}

.btn-primary:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #1D4E89;
    background: #1D4E89;
    border-color: #F00699;
}

.btn-secondary {
    background: #00B2CA;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 3px solid #50723C;
    cursor: pointer;
    box-shadow: 4px 4px 0px #50723C;
}

.btn-secondary:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #50723C;
    background: #50723C;
    border-color: #00B2CA;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 3px solid #1D4E89;
    background: white;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 3px 3px 0px #00B2CA;
}

.input-field:focus {
    outline: none;
    border-color: #F00699;
    box-shadow: 3px 3px 0px #F00699;
    transform: translate(-1px, -1px);
}

/* Item Cards */
.item-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 4px solid #1D4E89;
    box-shadow: 6px 6px 0px #00B2CA;
}

.item-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px #F00699;
    border-color: #F00699;
}

.item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #50723C;
    border-bottom: 4px solid #00B2CA;
}

.item-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #F00699;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 2px 2px 0px #1D4E89;
}

.store-badge {
    background: #1D4E89;
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    border: 2px solid #00B2CA;
}

.condition-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    margin-top: 4px;
    border: 2px solid;
}

.condition-like-new {
    background: #50723C;
    color: white;
    border-color: #D8DC6A;
}
.condition-excellent {
    background: #00B2CA;
    color: white;
    border-color: #1D4E89;
}
.condition-good {
    background: #D8DC6A;
    color: #50723C;
    border-color: #50723C;
}
.condition-fair {
    background: #F00699;
    color: white;
    border-color: #1D4E89;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    padding: 32px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #00B2CA;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #F00699;
    transform: rotate(90deg);
}

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

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(0, 178, 202, 0.2);
    border-radius: 50%;
    border-top: 3px solid #00B2CA;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Delete Button */
.btn-delete {
    background: #F00699;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 3px solid #1D4E89;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 3px 3px 0px #1D4E89;
}

.btn-delete:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #1D4E89;
    background: #1D4E89;
    border-color: #F00699;
}

/* Map Styling */
#map {
    z-index: 1;
}

.custom-marker {
    background: transparent !important;
    border: none !important;
}

/* Style Leaflet controls with Daisy Chain colors */
.leaflet-control-zoom a {
    background: #F00699 !important;
    color: white !important;
    border: 3px solid #1D4E89 !important;
    font-weight: bold !important;
    box-shadow: 3px 3px 0px #00B2CA !important;
}

.leaflet-control-zoom a:hover {
    background: #1D4E89 !important;
    border-color: #F00699 !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    border: 3px solid #1D4E89 !important;
    box-shadow: 4px 4px 0px #00B2CA !important;
}

.leaflet-popup-tip {
    background: white !important;
    border: 3px solid #1D4E89 !important;
    border-top: none !important;
    border-right: none !important;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px !important;
    border: 2px solid #1D4E89 !important;
    font-size: 10px !important;
}

/* Simple Mode - Black/White/Gray Accessibility Theme */
body.simple-mode {
    background: #f5f5f5 !important;
}

body.simple-mode .glass-card {
    background: white !important;
    border: 2px solid #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

body.simple-mode nav.glass-card {
    background: white !important;
    border-bottom: 2px solid #333 !important;
}

body.simple-mode .btn-primary {
    background: #333 !important;
    color: white !important;
    border: 2px solid #000 !important;
    box-shadow: 2px 2px 0px #666 !important;
}

body.simple-mode .btn-primary:hover {
    background: #000 !important;
    border-color: #333 !important;
    box-shadow: 1px 1px 0px #666 !important;
}

body.simple-mode .btn-secondary {
    background: #666 !important;
    color: white !important;
    border: 2px solid #333 !important;
    box-shadow: 2px 2px 0px #999 !important;
}

body.simple-mode .btn-secondary:hover {
    background: #333 !important;
    border-color: #666 !important;
    box-shadow: 1px 1px 0px #999 !important;
}

body.simple-mode .input-field {
    border: 2px solid #666 !important;
    box-shadow: 1px 1px 0px #999 !important;
}

body.simple-mode .input-field:focus {
    border-color: #000 !important;
    box-shadow: 1px 1px 0px #333 !important;
}

body.simple-mode .item-card {
    border: 2px solid #333 !important;
    box-shadow: 3px 3px 0px #999 !important;
}

body.simple-mode .item-card:hover {
    box-shadow: 5px 5px 0px #666 !important;
    border-color: #000 !important;
}

body.simple-mode .item-image {
    background: #ddd !important;
    border-bottom: 2px solid #666 !important;
}

body.simple-mode .item-badge {
    background: #333 !important;
    border: 2px solid white !important;
    box-shadow: 1px 1px 0px #000 !important;
}

body.simple-mode .store-badge {
    background: #666 !important;
    border: 2px solid #333 !important;
}

body.simple-mode .condition-badge {
    background: #eee !important;
    color: #333 !important;
    border-color: #666 !important;
}

body.simple-mode .close {
    color: #333 !important;
}

body.simple-mode .close:hover {
    color: #000 !important;
}

body.simple-mode .btn-delete {
    background: #333 !important;
    border: 2px solid #000 !important;
    box-shadow: 2px 2px 0px #666 !important;
}

body.simple-mode .btn-delete:hover {
    background: #000 !important;
    border-color: #333 !important;
    box-shadow: 1px 1px 0px #666 !important;
}

/* Override colorful text shadows in simple mode */
body.simple-mode h1,
body.simple-mode h2,
body.simple-mode h3 {
    text-shadow: none !important;
    color: #333 !important;
}

/* Inclusive Mode Toggle Switch */
#inclusiveModeToggle {
    transition: all 0.3s ease;
}

#inclusiveModeToggle:hover {
    transform: translateY(-2px);
}

#inclusiveModeToggle .glass-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 8px 12px !important;
}

#inclusiveModeToggle span {
    font-size: 11px !important;
}

body.simple-mode #inclusiveModeToggle span {
    color: #333 !important;
}

/* Toggle Switch Styling */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    display: inline-block;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #00B2CA;
    border: 2px solid #1D4E89;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 1px 1px 0px #1D4E89;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #333;
    border-color: #000;
    box-shadow: 1px 1px 0px #666;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch:hover .toggle-slider {
    box-shadow: 2px 2px 0px #1D4E89;
}

body.simple-mode .toggle-switch input:checked + .toggle-slider {
    background-color: #333;
    border-color: #000;
}

body.simple-mode .toggle-slider {
    background-color: #666;
    border-color: #333;
    box-shadow: 2px 2px 0px #999;
}

/* Earth GIF Styling */
.earth-gif-container {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #1D4E89;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 0 8px #00B2CA;
    position: relative;
}

.earth-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.simple-mode .earth-gif-container {
    border: 4px solid #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 4px #666;
}

/* Fashion Impact Statement Styling */
body.simple-mode .glass-card[style*="linear-gradient"] {
    background: white !important;
    border: 3px solid #333 !important;
}

/* Inclusive Mode - Home Page Specific Styles */

/* Main Welcome Header */
body.simple-mode h2 {
    text-shadow: none !important;
    color: #333 !important;
}

/* Mission statement text colors */
body.simple-mode p {
    color: #555 !important;
}

/* Stats Section Cards */
body.simple-mode .glass-card[style*="border-color"] {
    border-color: #333 !important;
}

body.simple-mode .glass-card[style*="border-color"] div {
    color: #333 !important;
}

/* Fashion Crisis & Shop Local Section Headers */
body.simple-mode .glass-card h3,
body.simple-mode .glass-card h4 {
    text-shadow: none !important;
    color: #333 !important;
}

/* Fashion Crisis Stat Cards */
body.simple-mode .glass-card .bg-white.rounded-xl {
    border: 3px solid #333 !important;
    box-shadow: 3px 3px 0px #666 !important;
}

/* Shop Local Benefit Cards - Override colored borders */
body.simple-mode .bg-white.rounded-xl[style*="border-4"] {
    border: 3px solid #333 !important;
    box-shadow: 3px 3px 0px #666 !important;
}

/* Colored text spans in simple mode */
body.simple-mode span[class*="text-[#"] {
    color: #333 !important;
}

/* Specific color overrides */
body.simple-mode .text-\[\#F00699\],
body.simple-mode .text-\[\#00B2CA\],
body.simple-mode .text-\[\#1D4E89\],
body.simple-mode .text-\[\#50723C\],
body.simple-mode .text-\[\#D8DC6A\] {
    color: #333 !important;
}

/* Override inline border colors on main sections */
body.simple-mode .glass-card[style*="border: 4px"],
body.simple-mode .glass-card[style*="border: 5px"] {
    border: 3px solid #333 !important;
}

/* Section text colors */
body.simple-mode .glass-card p {
    color: #555 !important;
}

body.simple-mode .glass-card p.font-bold {
    color: #333 !important;
}

/* Button text in Fashion Crisis section */
body.simple-mode .glass-card button.btn-primary {
    background: #333 !important;
    border-color: #333 !important;
}

body.simple-mode .glass-card button.btn-primary:hover {
    background: #555 !important;
}

/* Emoji styling remains visible in simple mode */
body.simple-mode .glass-card .text-4xl,
body.simple-mode .glass-card .text-5xl {
    opacity: 0.7;
}

/* Home page navigation buttons */
body.simple-mode .btn-primary {
    background: #333 !important;
    color: white !important;
    border-color: #333 !important;
}

body.simple-mode .btn-primary:hover {
    background: #555 !important;
}

body.simple-mode .btn-secondary {
    background: white !important;
    color: #333 !important;
    border-color: #333 !important;
}

body.simple-mode .btn-secondary:hover {
    background: #f0f0f0 !important;
}

/* UN SDG Badge Styling */
#sdgBadge {
    transition: all 0.3s ease;
}

#sdgBadge:hover {
    transform: translateY(-2px);
}

#sdgBadge .glass-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.sdg-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

body.simple-mode #sdgBadge p {
    color: #333 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .item-image {
        height: 200px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    #map {
        height: 400px !important;
    }

    .globe {
        width: 150px;
        height: 150px;
    }

    .globe-shadow {
        width: 130px;
        height: 20px;
    }

    .earth-gif-container {
        width: 200px;
        height: 200px;
    }

    #sdgBadge {
        bottom: 80px;
        left: 4px;
    }

    #sdgBadge .glass-card {
        padding: 8px !important;
    }

    #sdgBadge p {
        font-size: 10px !important;
    }

    .sdg-icon {
        width: 40px;
        height: 40px;
    }

    #inclusiveModeToggle {
        bottom: 4px;
        right: 4px;
    }
}
