/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000 !important; /* Force top layer */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Box */
.modal-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    text-align: center;
    max-height: 90vh; /* Prevent overflowing screen height */
    overflow-y: auto; /* Enable scrolling if content is too tall */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .modal-box {
        width: 95%;
        padding: 20px;
        margin: 10px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 1.8rem; /* Larger touch target */
        padding: 5px; /* Increase hit area */
    }
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-box {
    position: relative; /* Ensure absolute children (close button) are relative to this */
}

/* Close Button - Top Right */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #000;
}

/* Ensure title doesn't overlap with close button */
.modal-box h2 {
    padding-right: 30px; 
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #f39c12; /* Warning color by default */
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.modal-message {
    font-size: 1rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.modal-btn.cancel {
    background: #e0e0e0;
    color: #333;
}

.modal-btn.cancel:hover {
    background: #d0d0d0;
}

.modal-btn.confirm {
    background: var(--primary-color, #007bff);
    color: white;
}

.modal-btn.confirm:hover {
    filter: brightness(90%);
}

/* --- Premium Seller Profile Card Styling --- */
.seller-profile-card {
    padding: 0;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid rgba(0,0,0,0.05);
}

.seller-profile-card .modal-close {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0,0,0,0.1);
    top: 15px;
    right: 15px;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.seller-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a67c00 100%);
    padding: 40px 20px 60px;
    position: relative;
    text-align: center;
}

.seller-lg-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background: white;
}

.seller-info-main {
    margin-top: 65px;
    padding: 0 20px;
    text-align: center;
}

.seller-info-main h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin: 0 0 5px;
    font-weight: 700;
}

.seller-company-tag {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(212, 154, 18, 0.1);
    padding: 4px 12px;
    border-radius: 50px;
}

.seller-bio-section {
    padding: 20px 25px 10px;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
}

.seller-stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 20px 10px;
    margin: 0 20px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.stat-lbl {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.seller-social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0 10px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.social-btn.fb { background: #1877F2; }
.social-btn.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-btn.tw { background: #1DA1F2; }
.social-btn.li { background: #0A66C2; }

.seller-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 10px 25px;
}

.seller-actions-grid .action-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.action-btn.call {
    background: #e2e8f0;
    color: #1e293b;
}

.action-btn.call:hover {
    background: #cbd5e1;
}

.action-btn.wa {
    background: #25D366;
    color: white;
}

.action-btn.wa:hover {
    background: #20bd5a;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.action-btn.link {
    background: var(--primary-color);
    color: white;
    grid-column: 1 / -1;
}

.action-btn.link:hover {
    filter: brightness(110%);
    box-shadow: 0 4px 12px rgba(212, 154, 18, 0.3);
}

.action-btn.dash {
    background: #1e293b;
    color: white;
    grid-column: 1 / -1;
}

.action-btn.dash:hover {
    background: #0f172a;
}

.seller-footer-tools {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 25px 25px;
}

.seller-footer-tools button {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.seller-footer-tools button:hover {
    color: var(--primary-color);
}

.seller-footer-tools .btn-report:hover {
    color: #ef4444;
}
