/* WooCommerce Multi-Query Frontend Styles */

/* Reset and Base Styles */
.wcmq-quotation-form,
.wcmq-account-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Progress Steps */
.wcmq-progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wcmq-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.wcmq-step.active {
    color: #fff;
    transform: scale(1.05);
}

.wcmq-step-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wcmq-step.active .wcmq-step-icon {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.wcmq-step-text {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* Form Container */
.wcmq-form-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.wcmq-form-header {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.wcmq-form-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.wcmq-item-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Products List */
.wcmq-products-list {
    padding: 1.5rem;
    min-height: 100px;
}

.wcmq-product-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.wcmq-product-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.wcmq-product-info {
    flex: 1;
}

.wcmq-product-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.wcmq-product-details {
    color: #6c757d;
    font-size: 0.9rem;
}

.wcmq-product-actions {
    display: flex;
    gap: 0.5rem;
}

.wcmq-product-actions button {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wcmq-edit-btn {
    color: #28a745;
}

.wcmq-edit-btn:hover {
    background: #28a745;
    color: white;
}

.wcmq-delete-btn {
    color: #dc3545;
}

.wcmq-delete-btn:hover {
    background: #dc3545;
    color: white;
}

/* Add Product Form */
.wcmq-add-product-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.wcmq-add-product-form h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.wcmq-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.wcmq-form-group {
    display: flex;
    flex-direction: column;
}

.wcmq-form-group.wcmq-full-width {
    grid-column: 1 / -1;
}

.wcmq-form-group label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.wcmq-form-group input,
.wcmq-form-group select,
.wcmq-form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: white;
}

.wcmq-form-group input:focus,
.wcmq-form-group select:focus,
.wcmq-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wcmq-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Buttons */
.wcmq-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.wcmq-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.wcmq-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wcmq-btn-secondary {
    background: #6c757d;
    color: white;
}

.wcmq-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.wcmq-btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.wcmq-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.wcmq-btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Submit Section */
.wcmq-submit-section {
    background: #f8f9fa;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

/* Account Dashboard */
.wcmq-account-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.wcmq-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 12px;
    color: white;
}

.wcmq-dashboard-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

.wcmq-order-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Tabs */
.wcmq-tab-nav {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.wcmq-tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
    position: relative;
}

.wcmq-tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.wcmq-tab-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.wcmq-tab-content {
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

.wcmq-tab-panel {
    display: none;
    padding: 2rem;
}

.wcmq-tab-panel.active {
    display: block;
}

/* Quotations List */
.wcmq-quotation-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.wcmq-quotation-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.wcmq-quotation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.wcmq-quotation-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.wcmq-quotation-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.wcmq-status-pending {
    background: #fff3cd;
    color: #856404;
}

.wcmq-status-approved {
    background: #d4edda;
    color: #155724;
}

.wcmq-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.wcmq-quotation-details p {
    margin: 0.5rem 0;
    color: #6c757d;
}

.wcmq-quotation-items {
    margin-top: 1rem;
}

.wcmq-quotation-items h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 1rem;
}

.wcmq-quotation-items ul {
    margin: 0;
    padding-left: 1.5rem;
}

.wcmq-quotation-items li {
    margin-bottom: 0.25rem;
    color: #6c757d;
}

.wcmq-quotation-actions {
    margin-top: 1rem;
    text-align: right;
}

/* Account Form */
.wcmq-account-form h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

/* No Quotations */
.wcmq-no-quotations {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.wcmq-no-quotations p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Error Messages */
.wcmq-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin-bottom: 1rem;
}

.wcmq-success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    margin-bottom: 1rem;
}

/* Thank You Popup */
.wcmq-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.wcmq-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.wcmq-popup::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 50%;
    opacity: 0.1;
}

.wcmq-popup::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    opacity: 0.1;
}

.wcmq-popup-illustration {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.wcmq-characters {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1rem;
    position: relative;
}

.wcmq-character {
    font-size: 2rem;
    animation: wcmq-bounce 2s infinite;
}

.wcmq-character-female {
    animation-delay: 0s;
}

.wcmq-character-male {
    animation-delay: 0.5s;
}

.wcmq-thank-you-text {
    position: relative;
    margin: 1rem 0;
}

.wcmq-thank {
    font-size: 2.5rem;
    font-weight: 900;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    animation: wcmq-slideInLeft 1s ease-out;
}

.wcmq-you {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffd89b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: wcmq-slideInRight 1s ease-out 0.3s both;
}

.wcmq-heart-icon {
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 1.5rem;
    animation: wcmq-heartbeat 1.5s infinite;
}

.wcmq-popup h2 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
}

.wcmq-popup p {
    margin: 0 0 2rem 0;
    color: #6c757d;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.wcmq-popup-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

@keyframes wcmq-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes wcmq-slideInLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes wcmq-slideInRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes wcmq-heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wcmq-progress-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .wcmq-step {
        flex-direction: row;
        text-align: left;
    }
    
    .wcmq-step-icon {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .wcmq-form-row {
        grid-template-columns: 1fr;
    }
    
    .wcmq-dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .wcmq-tab-nav {
        flex-direction: column;
    }
    
    .wcmq-popup-actions {
        flex-direction: column;
    }
    
    .wcmq-quotation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: 42px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    padding-left: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Loading States */
.wcmq-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wcmq-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: wcmq-spin 1s linear infinite;
}

@keyframes wcmq-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Images */
.wcmq-product-image {
    width: 80px;
    height: 80px;
    margin-right: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wcmq-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcmq-no-image {
    font-size: 2rem;
    color: #ccc;
}

/* Select2 Product Results */
.wcmq-product-result {
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.wcmq-product-result .wcmq-product-image {
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
    margin-bottom: 0;
}

.wcmq-product-result .wcmq-product-info {
    flex: 1;
}

.wcmq-product-result .wcmq-product-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.wcmq-product-result .wcmq-product-price {
    color: #007cba;
    font-weight: 500;
    font-size: 0.9rem;
}

.wcmq-product-result .wcmq-product-description {
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Quotation Page Layout Improvements */
.wcmq-quotation-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wcmq-form-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wcmq-form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.wcmq-form-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

.wcmq-item-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    margin-left: 1rem;
}

.wcmq-add-product-form {
    padding: 2rem;
    border-bottom: 1px solid #eee;
}

.wcmq-add-product-form h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.wcmq-submit-section {
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
}

.wcmq-btn-large {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Product Actions Styling */
.wcmq-product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.wcmq-edit-btn,
.wcmq-duplicate-btn,
.wcmq-delete-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wcmq-edit-btn {
    background: #007cba;
    color: white;
}

.wcmq-edit-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.wcmq-duplicate-btn {
    background: #28a745;
    color: white;
}

.wcmq-duplicate-btn:hover {
    background: #1e7e34;
    transform: translateY(-2px);
}

.wcmq-delete-btn {
    background: #dc3545;
    color: white;
}

.wcmq-delete-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Product Details Styling */
.wcmq-detail-row {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.wcmq-detail-row strong {
    color: #333;
    font-weight: 600;
}

/* Upload Progress Bar */
.wcmq-upload-progress {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.wcmq-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.wcmq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #00a0d2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.wcmq-progress-text {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    display: block;
}

/* Artwork Preview */
.wcmq-artwork-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    background: #f8f9fa;
}

.wcmq-artwork-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wcmq-file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.wcmq-file-icon {
    font-size: 2rem;
}

.wcmq-file-name {
    font-weight: 600;
    color: #333;
}

.wcmq-remove-artwork {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.wcmq-remove-artwork:hover {
    background: #c82333;
}

/* Form Field Improvements */
.wcmq-form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.wcmq-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: white;
}

.wcmq-form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wcmq-product-image {
        width: 60px;
        height: 60px;
    }
    
    .wcmq-quotation-form {
        padding: 10px;
    }
    
    .wcmq-form-header {
        padding: 1.5rem;
    }
    
    .wcmq-form-header h2 {
        font-size: 1.5rem;
    }
    
    .wcmq-add-product-form {
        padding: 1.5rem;
    }
    
    .wcmq-submit-section {
        padding: 1.5rem;
    }
    
    .wcmq-artwork-preview img {
        max-width: 150px;
        max-height: 150px;
    }
    
    .wcmq-file-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}
