/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ===== HEADER STYLES ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s;
}

.logo-img:hover {
    transform: scale(1.05);
}

.bengali-text {
    font-size: 1.5rem;
    font-family: 'Noto Sans Bengali', 'Mukti', 'SolaimanLipi', sans-serif;
    flex-grow: 1;
    text-align: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.blogs-btn {
    background-color: transparent;
    color: white;
    padding: 0.5rem 1rem;
    border: 1px solid white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.blogs-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.supplier-register {
    background-color: #ff9800;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.supplier-register:hover {
    background-color: #f57c00;
}

/* ===== MAIN CONTENT LAYOUT ===== */
main {
    display: flex;
    padding: 2rem 5%;
    min-height: calc(100vh - 150px);
    gap: 2rem;
}

/* ===== FILTERS SECTION ===== */
.filters {
    flex: 0 0 25%;
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    max-height: 85vh;
    overflow-y: auto;
}

.filters h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e0e0e0;
    color: #1a73e8;
}

.filter-group {
    margin-bottom: 1.2rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background-color: #f8f9fa;
    cursor: pointer;
}

.filter-header h3 {
    font-size: 1rem;
    color: #333;
}

.toggle-arrow {
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.filter-content {
    padding: 0.8rem 1rem;
    background-color: white;
    display: none;
}

.filter-content.active {
    display: block;
}

.filter-item {
    margin: 0.6rem 0;
    display: flex;
    align-items: center;
}

.filter-item input[type="checkbox"] {
    margin-right: 0.7rem;
    width: 16px;
    height: 16px;
}

.filter-item label {
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
}

.sub-items {
    padding-left: 1.5rem;
    margin-top: 0.3rem;
    border-left: 2px solid #e0e0e0;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.apply-btn {
    width: 50%;
    padding: 0.8rem;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.apply-btn:hover {
    background-color: #0d47a1;
}

.reset-btn {
    width: 50%;
    padding: 0.8rem;
    background-color: #E14434;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reset-btn:hover {
    background-color: #d32f2f;
}

/* ===== SUPPLIERS SECTION ===== */
.suppliers {
    flex: 1;
}

.suppliers h2 {
    margin-bottom: 1.5rem;
    color: #1a73e8;
}

.suppliers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.supplier-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    position: relative;
    padding-bottom: 50px;
}

.supplier-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.supplier-header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 1rem;
}

.supplier-header h3 {
    font-size: 1.3rem;
}

.supplier-info {
    padding: 0.8rem 1rem;
    background-color: #f8f9fa;
    font-size: 0.85rem;
    border-bottom: 1px solid #e0e0e0;
}

.supplier-basic-details {
    padding: 1rem;
}

.supplier-full-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1rem;
}

.supplier-full-details.expanded {
    max-height: 1000px;
    padding: 0 1rem 1rem;
}

.supplier-details h4 {
    color: #1a73e8;
    margin: 0.5rem 0 0.3rem;
    font-size: 0.95rem;
}

.supplier-details p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.5rem;
}

/* ===== CALL BUTTON STYLES ===== */
.call-btn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: #4CAF50;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.call-btn:hover {
    background-color: #3e8e41;
}

.call-icon {
    width: 16px;
    height: 16px;
}

/* ===== INFO ICON STYLES ===== */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 5px;
    color: #1a73e8;
    font-weight: bold;
    background-color: white;
    border: 1px solid #1a73e8;
    border-radius: 50%;
    cursor: help;
    position: relative;
}

/* Tooltip for desktop */
.info-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    max-width: 200px;
    padding: 8px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 0.8rem;
    z-index: 100;
    white-space: normal;
    word-wrap: break-word;
}

/* ===== EQUIPMENT STATUS STYLES ===== */
.equipment-yes {
    color: #2e7d32;
    font-weight: 600;
}

.equipment-no {
    color: #c62828;
    font-weight: 600;
}

.equipment-label {
    font-weight: bold;
    color: #333;
}

.equipment-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

/* ===== SHOW MORE BUTTON ===== */
.show-more-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #1a73e8;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

.show-more-btn:hover {
    color: #0d47a1;
}

/* ===== FOOTER STYLES ===== */
footer {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 2rem 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    padding: 0 5%;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: #ff9800;
}

.footer-section p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ff9800;
}

.footer-bottom {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ===== LOCATION-BASED STYLES (NEW) ===== */
/* Location Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.allow-btn {
    background-color: #1a73e8;
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 4px;
    margin: 1rem 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.allow-btn:hover {
    background-color: #0d47a1;
}

.deny-btn {
    background-color: #f5f5f5;
    color: #333;
    padding: 0.7rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 1rem 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.deny-btn:hover {
    background-color: #e0e0e0;
}

/* Location Display */
.location-display {
    padding: 0.8rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.location-display span {
    font-weight: 600;
    color: #1a73e8;
}

/* Distance Indicator */
.distance-indicator {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: #e8f0fe;
    color: #1a73e8;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    font-weight: 600;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 900px) {
    main {
        flex-direction: column;
    }
    
    .filters {
        width: 100%;
        max-height: none;
    }
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .logo-img {
        margin-bottom: 0.5rem;
    }
    
    .bengali-text {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .blogs-btn, .supplier-register {
        width: 100%;
        text-align: center;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .apply-btn, .reset-btn {
        width: 100%;
    }
    
    .call-btn, .show-more-btn {
        position: static;
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }

    /* Mobile modal adjustments */
    .modal-content {
        margin: 30% auto;
        width: 90%;
    }
    
    .allow-btn, .deny-btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }

    /* Mobile tooltip adjustment */
    .info-icon:hover::after {
        left: 50%;
        top: 120%;
        transform: translateX(-50%);
        max-width: 90vw;
    }
}
