/**
 * Make Offer Functionality Styles
 * Styles for the make offer form and interactions
 */

/* Popup Overlay */
.prf-offer-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Prevent body scroll when popup is open */
body.prf-offer-popup-open {
    overflow: hidden;
}

/* Form Container in Popup */
.prf-offer-popup-overlay .prf-offer-form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: prf-popup-slide-in 0.3s ease-out;
}

@keyframes prf-popup-slide-in {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Make Offer Section */
.prf-make-offer-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.prf-make-offer-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.prf-make-offer-section h4 i {
    margin-right: 10px;
    color: #0073aa;
    font-size: 20px;
}

.prf-make-offer-section p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.prf-make-offer-section p strong {
    color: #0073aa;
    font-size: 16px;
}

/* Make Offer Button */
.prf-make-offer-btn {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.prf-make-offer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.prf-make-offer-btn:active {
    transform: translateY(0);
}

.prf-make-offer-btn i {
    margin-right: 8px;
}

/* Offer Form Container */
.prf-offer-form-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Override styles when in popup */
.prf-offer-popup-overlay .prf-offer-form-container {
    margin-top: 0;
    border: none;
    box-shadow: none;
}

.prf-offer-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.prf-offer-form-title {
    margin: 0;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.prf-close-offer-form {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prf-close-offer-form:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Form Groups */
.prf-offer-form-group {
    margin-bottom: 20px;
}

.prf-offer-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.prf-offer-form-input,
.prf-offer-form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.prf-offer-form-input:focus,
.prf-offer-form-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.prf-offer-form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Suggested Prices */
.prf-suggested-prices {
    margin-top: 10px;
}

.prf-suggested-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.prf-suggested-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.prf-suggested-price-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.prf-suggested-price-btn:hover {
    background: #e9ecef;
    border-color: #0073aa;
    color: #0073aa;
}

.prf-suggested-price-btn.selected {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

/* Form Actions */
.prf-offer-form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.prf-submit-offer-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.prf-submit-offer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.prf-submit-offer-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.prf-submit-offer-btn i {
    margin-right: 8px;
}

/* Loading State */
.prf-form-loading {
    display: none;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.prf-form-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

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

/* Success/Error Messages */
.prf-offer-success,
.prf-offer-error {
    display: none;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
}

.prf-offer-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.prf-offer-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.prf-offer-success i,
.prf-offer-error i {
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .prf-make-offer-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .prf-offer-form-container {
        padding: 15px;
    }
    
    .prf-suggested-buttons {
        flex-direction: column;
    }
    
    .prf-suggested-price-btn {
        width: 100%;
        text-align: center;
    }
    
    .prf-offer-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .prf-submit-offer-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Popup responsive styles */
    .prf-offer-popup-overlay {
        padding: 10px;
    }
    
    .prf-offer-popup-overlay .prf-offer-form-container {
        max-width: 100%;
        max-height: 95vh;
    }
}
