/*
 * Customer Vendor Contact Plugin Styles
 * Frontend styles for customer interface
 */

/* Contact Vendor Section */
.cvc-contact-vendor-section {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #fff;
}

.cvc-section-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.cvc-section-title {
    color: #2c3e50;
    font-size: 24px;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cvc-section-title:before {
    content: "✉";
    color: #007cba;
    font-size: 20px;
}

.cvc-section-description {
    color: #666;
    margin: 0;
    font-size: 16px;
}

/* Vendor Cards */
.cvc-vendors-list {
    display: grid;
    gap: 20px;
}

.cvc-vendor-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.cvc-vendor-card:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.cvc-vendor-info {
    flex: 1;
}

.cvc-vendor-name {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.cvc-vendor-products {
    margin-top: 10px;
}

.cvc-products-label {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.cvc-products-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cvc-products-list li {
    padding: 3px 0;
    color: #555;
    font-size: 14px;
}

.cvc-contact-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 140px;
    justify-content: center;
}

.cvc-contact-btn:before {
    content: "✉";
    font-size: 12px;
}

.cvc-contact-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #003d5c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.cvc-contact-btn:active {
    transform: translateY(0);
}

/* Modal Styles */
.cvc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999 !important;
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* When modal is visible */
.cvc-modal[style*="flex"] {
    display: flex !important;
}

.cvc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.cvc-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: cvcModalSlideIn 0.3s ease-out;
}

@keyframes cvcModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cvc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.cvc-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.cvc-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cvc-modal-close:before {
    content: "×";
    font-size: 24px;
    line-height: 1;
}

.cvc-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.cvc-modal-body {
    padding: 25px;
}

/* Form Styles */
.cvc-form-group {
    margin-bottom: 20px;
}

.cvc-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}

.cvc-form-group .required {
    color: #e74c3c;
}

.cvc-form-group input,
.cvc-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cvc-form-group input:focus,
.cvc-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.cvc-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.cvc-order-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
}

.cvc-order-info h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
}

.cvc-order-details p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.cvc-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cvc-btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cvc-btn-cancel:hover {
    background: #5a6268;
}

.cvc-btn-send {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    position: relative;
}

.cvc-btn-send:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.cvc-btn-send:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Alert Styles */
.cvc-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    max-width: 400px;
    animation: cvcSlideInRight 0.3s ease-out;
}

/* Ensure no full-screen overlay background from theme-level .success class */
.cvc-alert.success { background: transparent !important; }

@keyframes cvcSlideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cvc-alert-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #d4edda;
    border-left: 4px solid #28a745;
    border-radius: 6px;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cvc-alert.error .cvc-alert-content {
    border-color: #f5c6cb;
    border-left-color: #dc3545;
}

.cvc-alert-message {
    flex: 1;
    color: #155724;
    font-weight: 600;
    font-size: 14px;
}

.cvc-alert.error .cvc-alert-message {
    color: #721c24;
}

.cvc-alert-close {
    background: none;
    border: none;
    color: #155724;
    cursor: pointer;
    padding: 2px;
    margin-left: 10px;
    border-radius: 3px;
    transition: background 0.2s ease;
    font-size: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cvc-alert-close:before {
    content: "×";
    font-size: 16px;
    line-height: 1;
}

.cvc-alert.error .cvc-alert-close {
    color: #721c24;
}

.cvc-alert-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Loading Animation */
.cvc-btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cvc-btn-loading:before {
    content: "⟳";
    animation: spin 1s linear infinite;
    font-size: 14px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Ensure modal appears above everything */
body.cvc-modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cvc-contact-vendor-section {
        margin: 20px 0;
        padding: 15px;
    }
    
    .cvc-vendor-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cvc-contact-btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .cvc-modal {
        padding: 10px;
    }
    
    .cvc-modal-content {
        max-height: 95vh;
    }
    
    .cvc-modal-header,
    .cvc-modal-body {
        padding: 20px;
    }
    
    .cvc-form-actions {
        flex-direction: column;
    }
    
    .cvc-form-actions .button {
        width: 100%;
        margin: 0;
    }
    
    .cvc-alert {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .cvc-section-title {
        font-size: 20px;
        flex-direction: column;
        gap: 5px;
    }
    
    .cvc-section-description {
        font-size: 14px;
    }
    
    .cvc-modal-header h3 {
        font-size: 18px;
    }
} 