/* RFQ Button Styles */
.rfq-button {
    display: inline-block;
    padding: 10px 20px;
    background: #337ab7;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin: 10px 0;
    transition: background 0.3s;
    font-family: Arial, sans-serif;
}

.rfq-button:hover {
    background: #286090;
}

.single-rfq-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px 25px;
    background: linear-gradient(to bottom, #96588a, #7c3c6e);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.single-rfq-btn:hover {
    background: linear-gradient(to bottom, #8a4c7d, #6e345f);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.single-rfq-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.single-rfq-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.single-rfq-btn:hover::after {
    left: 100%;
}

/* Popup Styles */
.rfq-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    overflow-y: auto;
}

.rfq-popup-content {
    background: #fff;
    width: 90%;
    max-width: 700px;
    margin: 50px auto;
    padding: 25px;
    position: relative;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
}

.rfq-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #555;
    transition: color 0.3s;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.rfq-close:hover {
    color: #000;
}

/* Table Styles */
#rfq-items-container {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

#rfq-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    display: none;
}

#rfq-items-table th, 
#rfq-items-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

#rfq-items-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.rfq-qty-cell {
    width: 150px;
}

.rfq-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rfq-qty-btn {
    width: 35px;
    height: 35px;
    background: #337ab7;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 35px;
    padding: 0;
    text-align: center;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-family: Arial, sans-serif;
}

.rfq-qty-btn:hover {
    background: #286090;
}

.qty-symbol {
    display: block;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.rfq-qty-input {
    width: 50px;
    height: 35px;
    text-align: center;
    margin: 0 10px;
    border: 1px solid #ddd;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 16px;
    -moz-appearance: textfield;
}

/* Hide number input arrows in Chrome, Safari, Edge, Opera */
.rfq-qty-input::-webkit-outer-spin-button,
.rfq-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.remove-rfq-item {
    background: #ff4444;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 35px;
    padding: 0;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-rfq-item:hover {
    background: #cc0000;
}

.remove-symbol {
    display: block;
    font-size: 22px;
    line-height: 1;
    font-weight: bold;
}

#rfq-empty {
    text-align: center;
    padding: 30px;
    color: #777;
    font-size: 16px;
    display: block;
}

/* Form Styles */
#rfq-form {
    margin-top: 20px;
}

.form-field {
    margin-bottom: 15px;
}

#rfq-form input,
#rfq-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 0;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    transition: border-color 0.3s, background-color 0.3s;
}

#rfq-form input:focus,
#rfq-form textarea:focus {
    border-color: #337ab7;
    outline: none;
    box-shadow: 0 0 0 2px rgba(51, 122, 183, 0.2);
}

#rfq-form textarea {
    min-height: 100px;
    resize: vertical;
}

#rfq-form button {
    background: #337ab7;
    color: white;
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    border-radius: 3px;
    transition: background 0.3s;
    font-family: Arial, sans-serif;
}

#rfq-form button:hover {
    background: #286090;
}

#rfq-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Success Message */
#rfq-success {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 3px;
    margin-top: 20px;
    font-family: Arial, sans-serif;
}

#rfq-success h3 {
    color: #4CAF50;
    margin-top: 0;
}

/* Enhanced Error Styles */
.rfq-error {
    background: #ffebee !important;
    color: #c62828 !important;
    padding: 15px !important;
    margin-bottom: 20px !important;
    border-radius: 6px !important;
    border-left: 4px solid #c62828 !important;
    font-size: 14px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rfq-error ul {
    margin: 10px 0 0 0 !important;
    padding-left: 20px !important;
}

.rfq-error li {
    margin-bottom: 5px !important;
    line-height: 1.4;
}

.rfq-error strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

input.error,
textarea.error {
    border-color: #c62828 !important;
    background-color: #ffebee !important;
}

input.error:focus,
textarea.error:focus {
    border-color: #c62828 !important;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.2) !important;
}

/* Elementor RFQ Widget Styles */
.elementor-rfq-widget {
    position: relative;
    display: inline-block;
}

.elementor-rfq-toggle {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 25px;
    text-decoration: none;
    color: #333;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.elementor-rfq-toggle:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #000;
}

.elementor-rfq-icon {
    position: relative;
    margin-right: 8px;
}

.elementor-rfq-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.elementor-rfq-text {
    font-weight: 600;
    font-size: 14px;
}

.elementor-rfq-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    margin-top: 10px;
}

.elementor-rfq-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.elementor-rfq-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
}

.elementor-rfq-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.elementor-rfq-item:last-child {
    border-bottom: none;
}

.elementor-rfq-item-name {
    flex: 1;
    font-size: 14px;
    margin-right: 10px;
    line-height: 1.3;
}

.elementor-rfq-item-qty {
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: #337ab7;
    font-size: 13px;
}

.elementor-rfq-remove {
    background: #ff4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 24px;
    padding: 0;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.elementor-rfq-remove:hover {
    background: #cc0000;
}

.elementor-rfq-footer {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.elementor-rfq-actions {
    display: flex;
    gap: 10px;
}

.elementor-rfq-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 13px;
}

.elementor-rfq-view-btn {
    background: #6c757d;
    color: white;
}

.elementor-rfq-view-btn:hover {
    background: #5a6268;
}

.elementor-rfq-submit-btn {
    background: #28a745;
    color: white;
}

.elementor-rfq-submit-btn:hover {
    background: #218838;
}

.elementor-rfq-empty {
    padding: 30px 20px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.mini-rfq-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 18px;
    border-radius: 6px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .rfq-popup-content {
        width: 95%;
        padding: 15px;
        margin: 20px auto;
    }
    
    #rfq-items-table th, 
    #rfq-items-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    .rfq-qty-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
        line-height: 30px;
    }
    
    .remove-rfq-item {
        width: 30px;
        height: 30px;
        font-size: 16px;
        line-height: 30px;
    }
    
    .rfq-qty-input {
        width: 40px;
        height: 30px;
        margin: 0 8px;
        font-size: 14px;
    }
    
    .qty-symbol {
        font-size: 18px;
    }
    
    .remove-symbol {
        font-size: 20px;
    }
    
    .single-rfq-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Responsive Elementor RFQ */
    .elementor-rfq-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 8px 8px 0 0;
        margin-top: 0;
        max-width: none;
    }
    
    .elementor-rfq-dropdown::before {
        display: none;
    }
    
    .elementor-rfq-text {
        display: none;
    }
    
    .elementor-rfq-toggle {
        padding: 8px 12px;
    }
    
    .elementor-rfq-items {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .single-rfq-btn {
        padding: 10px 15px;
        font-size: 13px;
        letter-spacing: 0.3px;
    }
    
    .elementor-rfq-dropdown {
        width: 100%;
        right: 0;
        left: 0;
    }
}