/* ============================================
   Xpertdezine Product Inquiry Manager - Frontend CSS
   ============================================ */

/* Button Styles */
.xdpim-button-container {
    margin: 25px 0;
}

.xdpim-inquiry-button {
    padding: 14px 30px;
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.xdpim-inquiry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0.9;
}

.button-icon {
    font-size: 18px;
}

/* Modal Styles */
.xdpim-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.xdpim-modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.xdpim-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xdpim-modal-header h3 {
    margin: 0;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon {
    font-size: 24px;
}

.xdpim-close {
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.xdpim-close:hover {
    transform: scale(1.1);
    color: #ff6b6b;
}

/* Product Info Section */
.xdpim-product-info {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    align-items: center;
}

.product-image {
    flex-shrink: 0;
}

.product-details {
    flex-grow: 1;
}

.product-details strong {
    display: block;
    color: #495057;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

/* Form Styles */
.xdpim-inquiry-form {
    padding: 25px;
}

.xdpim-form-group {
    margin-bottom: 22px;
}

.xdpim-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.field-icon {
    margin-right: 8px;
    font-size: 16px;
}

.required {
    color: #e74c3c;
    margin-left: 5px;
}

.xdpim-form-group input,
.xdpim-form-group textarea,
.xdpim-form-group select {
    width: 95%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.xdpim-form-group input:focus,
.xdpim-form-group textarea:focus,
.xdpim-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.xdpim-form-group input:hover,
.xdpim-form-group textarea:hover {
    border-color: #adb5bd;
}

.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

/* Form Actions */
.xdpim-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.xdpim-submit-btn,
.xdpim-cancel-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.xdpim-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.xdpim-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.xdpim-cancel-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.xdpim-cancel-btn:hover {
    background: #e9ecef;
}

/* Loading State */
.xdpim-loading {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    margin: 15px 0;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.xdpim-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
}

.xdpim-success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.xdpim-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Scrollbar Styling */
.xdpim-modal-content::-webkit-scrollbar {
    width: 8px;
}

.xdpim-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.xdpim-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.xdpim-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .xdpim-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .xdpim-product-info {
        flex-direction: column;
        text-align: center;
    }
    
    .xdpim-form-actions {
        flex-direction: column;
    }
    
    .xdpim-submit-btn,
    .xdpim-cancel-btn {
        width: 100%;
        justify-content: center;
    }
}