:root {
    --primary-color: #1976d2;
    --secondary-color: #d32f2f;
}

#wfs-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#wfs-popup-overlay.wfs-visible {
    opacity: 1;
    visibility: visible;
}

#wfs-popup-overlay.wfs-hidden {
    display: none;
}

#wfs-popup-modal {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-overflow-scrolling: touch;
}

#wfs-popup-overlay.wfs-visible #wfs-popup-modal {
    transform: scale(1);
}

#wfs-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
}

#wfs-close:hover {
    color: #000;
}

#wfs-popup-modal h2 {
    margin: 0 0 15px;
    color: var(--secondary-color);
    font-size: 26px;
    text-align: center;
}

#wfs-popup-modal p {
    margin: 0 0 20px;
    color: #555;
    text-align: center;
    font-size: 14px;
}

.wfs-prices {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

.wfs-prices span {
    font-size: 14px;
}

.wfs-prices strong {
    color: #2e7d32;
    font-size: 16px;
}

#wfs-bid-form label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
}

#wfs-bid-form input,
#wfs-bid-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
}

#wfs-bid-form textarea {
    height: 80px;
    resize: vertical;
}

#wfs-bid-form button {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#wfs-bid-form button:hover {
    background: #b71c1c;
}

.wfs-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}

.wfs-button:hover {
    background: #1565c0;
}

.wfs-purchase-link {
    background: #388e3c;
}

.wfs-purchase-link:hover {
    background: #2e7d32;
}

.wfs-sponsored-link {
    background: #455a64;
}

.wfs-sponsored-link:hover {
    background: #37474f;
}

#wfs-message {
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
}

#wfs-message.success {
    color: #2e7d32;
}

#wfs-message.error {
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    #wfs-popup-modal {
        max-width: 95%;
        max-height: 90vh;
        padding: 15px;
    }
    
    #wfs-popup-modal h2 {
        font-size: 22px;
    }
    
    #wfs-popup-modal p {
        font-size: 12px;
    }
    
    .wfs-prices {
        flex-direction: column;
        gap: 10px;
    }
    
    #wfs-bid-form label {
        font-size: 14px;
    }
    
    #wfs-bid-form input,
    #wfs-bid-form textarea {
        font-size: 12px;
    }
    
    .wfs-button {
        font-size: 12px;
        padding: 8px 16px;
    }
}