/* Quote System CSS */
.wc-quote-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.quote-page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.quote-breadcrumb {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.quote-breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.quote-breadcrumb a:hover {
    text-decoration: underline;
}

.quote-page-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title {
    color: #2c3e50;
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
}

.quote-summary-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.items-count {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 50px;
}

.items-count .count {
    font-size: 24px;
    font-weight: 700;
    color: #3498db;
}

.items-count .label {
    color: #7f8c8d;
    font-size: 14px;
}

/* Content Layout */
.quote-page-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .quote-page-content {
        grid-template-columns: 1fr;
    }
}

/* Products Section */
.quote-products-section h2,
.quote-form-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 24px;
}

.quote-products-container {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.products-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
}

/* Empty State */
.empty-quote {
    text-align: center;
    padding: 60px 20px;
}

.empty-quote .empty-icon {
    margin-bottom: 20px;
}

.empty-quote .empty-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #ddd;
}

.empty-quote h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 20px;
}

.empty-quote p {
    color: #95a5a6;
    margin-bottom: 20px;
}

.empty-quote .button {
    min-width: 200px;
}

/* Product Item */
.quote-product-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.quote-product-item:last-child {
    border-bottom: none;
}

.product-image {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 8px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-image a:hover img {
    transform: scale(1.05);
}

.product-details {
    flex: 1;
}

.product-name {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.product-name a {
    color: #2c3e50;
    text-decoration: none;
}

.product-name a:hover {
    color: #3498db;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.product-meta .sku {
    font-size: 14px;
    color: #7f8c8d;
}

/* Remove price styling since we don't need it */
.product-meta .price {
    display: none;
}

.product-actions .remove-item {
    background: none;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.product-actions .remove-item:hover {
    background: #e74c3c;
    color: white;
}

/* Quantity Controls */
.product-quantity {
    text-align: center;
    min-width: 120px;
}

.product-quantity label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.quantity-control button {
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.quantity-control button:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.quantity-control .qty-input {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    font-size: 16px;
    font-weight: 600;
    margin: 0 -1px;
}

.quantity-control .qty-input:focus {
    outline: none;
    border-color: #3498db;
}

/* Products Actions */
.products-actions {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 15px;
    background: #f8f9fa;
}

.products-actions .button {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
}

.products-actions .button.secondary {
    background: #95a5a6;
    color: white;
    border: none;
}

.products-actions .button.secondary:hover {
    background: #7f8c8d;
}

/* Form Section */
.quote-request-form {
    background: white;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Remove Quote Summary Box since we don't need prices */
.quote-summary-box {
    display: none;
}

/* Form Submit */
.form-submit {
    margin-top: 30px;
}

.submit-quote-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-quote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-quote-btn .spinner {
    display: none;
}

.submit-quote-btn.loading .button-text {
    display: none;
}

.submit-quote-btn.loading .spinner {
    display: inline-block;
}

.form-notice {
    text-align: center;
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 14px;
}

.form-notice p {
    margin: 0;
}

/* Success Modal */
.quote-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 22px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.success-icon {
    margin-bottom: 25px;
}

.success-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #27ae60;
}

.success-message {
    margin-bottom: 30px;
}

.success-message p {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 16px;
    line-height: 1.5;
}

.quote-ref {
    margin: 20px 0 !important;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.quote-ref strong {
    display: block;
    margin-top: 5px;
    font-size: 22px;
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.modal-actions .button {
    flex: 1;
    padding: 12px 20px;
}

/* Menu Counter */
.quote-counter-menu {
    position: relative;
}

.quote-counter-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    position: relative;
}

.quote-counter-link:hover {
    color: #3498db;
}

.quote-icon {
    font-size: 20px;
    line-height: 1;
}

.quote-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.quote-text {
    font-weight: 500;
}

.quote-count {
    background: #e74c3c;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

/* Quote Dropdown (Mini Cart Style) */
.quote-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
    margin-top: 10px;
}

.quote-counter-menu:hover .quote-dropdown {
    display: block;
}

.quote-dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.quote-dropdown-header strong {
    color: #2c3e50;
    font-size: 16px;
}

.quote-item-count {
    font-size: 14px;
    color: #7f8c8d;
}

.quote-dropdown-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.quote-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

.quote-dropdown-item:hover {
    background: #f8f9fa;
}

.quote-item-image {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    flex-shrink: 0;
}

.quote-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.quote-item-image a {
    display: block;
}

.quote-item-details {
    flex: 1;
    min-width: 0;
}

.quote-item-title {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quote-item-title:hover {
    color: #3498db;
}

.quote-item-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #7f8c8d;
}

.quote-item-remove {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 10px;
}

.quote-item-remove:hover {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
}

.quote-dropdown-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.quote-dropdown-footer .button {
    flex: 1;
    padding: 8px 15px;
    font-size: 14px;
}

.view-quote-btn {
    background: #3498db;
    color: white;
    border: none;
}

.view-quote-btn:hover {
    background: #2980b9;
}

.clear-quote-btn {
    background: #95a5a6;
    color: white;
    border: none;
}

.clear-quote-btn:hover {
    background: #7f8c8d;
}

/* Notification */
.wc-quote-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wc-quote-notification.error {
    background: #e74c3c;
}

.wc-quote-notification .dashicons {
    font-size: 20px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Add to Quote Button on Product Pages */
.add-to-quote-single-btn,
.add-to-quote-shop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.add-to-quote-single-btn:hover,
.add-to-quote-shop-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.add-to-quote-single-btn .dashicons,
.add-to-quote-shop-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Customer Quotes List */
.customer-quotes-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.customer-quotes-list h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
}

.quotes-table-container {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.quotes-table {
    width: 100%;
    border-collapse: collapse;
}

.quotes-table thead {
    background: #f8f9fa;
}

.quotes-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quotes-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.quotes-table tbody tr:hover {
    background: #f8f9fa;
}

.quote-status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #f39c12;
    color: white;
}

.status-accepted {
    background: #27ae60;
    color: white;
}

.status-rejected {
    background: #e74c3c;
    color: white;
}

.status-expired {
    background: #95a5a6;
    color: white;
}

.status-converted {
    background: #3498db;
    color: white;
}

.view-quote-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
}

.view-quote-btn:hover {
    background: #2980b9;
    color: white;
}

.view-quote-btn.small {
    padding: 6px 12px;
    font-size: 13px;
}

/* No Quotes */
.no-quotes {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
}

.no-quotes p {
    color: #7f8c8d;
    font-size: 16px;
}

/* Pagination */
.quotes-pagination {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.quotes-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 2px;
    border: 1px solid #ddd;
    background: white;
    color: #3498db;
    text-decoration: none;
    border-radius: 4px;
}

.quotes-pagination .page-numbers.current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.quotes-pagination .page-numbers:hover:not(.current) {
    background: #f8f9fa;
    border-color: #3498db;
}

/* Login Required */
.quote-login-required {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-quote-page {
        padding: 15px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .quote-product-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }
    
    .product-image {
        margin: 0 auto;
    }
    
    .quote-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        border-radius: 8px 8px 0 0;
        max-height: 70vh;
    }
    
    .quote-counter-menu:hover .quote-dropdown {
        display: block;
    }
    
    .quote-dropdown-items {
        max-height: 50vh;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .quotes-table {
        display: block;
        overflow-x: auto;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .quote-page-header,
    .products-actions,
    .form-submit,
    .modal-actions {
        display: none !important;
    }
    
    .quote-page-content {
        display: block !important;
    }
    
    .quote-products-container,
    .quote-request-form {
        border: none !important;
        box-shadow: none !important;
    }
}