/* Quote System Styles */

/* Dashboard Container */
.wc-api-sync-quote-dashboard {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 15px;
}

.wc-api-sync-quote-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 3px solid #f0f0f0;
}

.wc-api-sync-quote-dashboard-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Quote List */
.wc-api-sync-quote-list {
    display: grid;
    gap: 20px;
}

/* Quote Item Card */
.wc-api-sync-quote-item {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wc-api-sync-quote-item:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

/* Quote Item Header */
.quote-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.quote-item-title {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
}

.quote-number-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    flex-shrink: 0;
}

.quote-id {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

.quote-header-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.quote-date {
    margin: 0;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.date-icon {
    font-size: 14px;
}

/* Status Badge */
.quote-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.quote-status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.quote-status-badge.status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.quote-status-badge.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-icon {
    font-size: 14px;
}

.status-text {
    letter-spacing: 0.5px;
}

/* Products Section */
.quote-item-products {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.products-header {
    margin-bottom: 15px;
}

.products-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-list {
    display: grid;
    gap: 12px;
}

.product-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.product-item:hover {
    background: #f0f0f0;
}

.product-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    font-size: 28px;
    color: #ccc;
}

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.product-name:hover {
    color: #764ba2;
    text-decoration: underline;
}

.product-quantity {
    font-size: 12px;
    color: #666;
}

.product-quantity strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Actions */
.quote-item-actions {
    display: flex;
    gap: 12px;
}

.btn-view-details,
.btn-checkout {
    flex: 1;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}

.btn-view-details {
    background: #f0f0f0;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}

.btn-view-details:hover {
    background: #e0e0e0;
    border-color: #d0d0d0;
}

.btn-checkout {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.arrow {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.btn-view-details:hover .arrow,
.btn-checkout:hover .arrow {
    transform: translateX(2px);
}

/* Empty State */
.wc-api-sync-quote-empty {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    color: #666;
}

.wc-api-sync-quote-empty p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-api-sync-quote-dashboard {
        margin: 20px 0;
        padding: 0 10px;
    }

    .wc-api-sync-quote-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 25px;
    }

    .wc-api-sync-quote-dashboard-header h2 {
        font-size: 24px;
    }

    .quote-item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .quote-status-badge {
        align-self: flex-start;
    }

    .quote-item-actions {
        flex-direction: column;
    }

    .btn-view-details,
    .btn-checkout {
        width: 100%;
    }

    .product-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-image {
        width: 100%;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .wc-api-sync-quote-dashboard-header h2 {
        font-size: 20px;
    }

    .quote-number-badge {
        width: 40px;
        height: 40px;
    }

    .quote-id {
        font-size: 14px;
    }

    .quote-header-info h3 {
        font-size: 16px;
    }

    .quote-date {
        font-size: 12px;
    }

    .wc-api-sync-quote-item {
        padding: 16px;
    }

    .quote-item-products {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .products-header h4 {
        font-size: 12px;
    }

    .product-item {
        padding: 10px;
    }

    .product-image {
        height: 120px;
    }

    .product-name {
        font-size: 13px;
    }

    .product-quantity {
        font-size: 11px;
    }

    .btn-view-details,
    .btn-checkout {
        padding: 10px 12px;
        font-size: 12px;
    }

    .wc-api-sync-quote-empty {
        padding: 40px 20px;
    }

    .wc-api-sync-quote-empty p {
        font-size: 14px;
    }
}

/* Form Styles */
.wc-api-sync-quote-page-wrapper {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 15px;
}

.wc-api-sync-quote-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wc-api-sync-quote-header {
    margin-bottom: 30px;
    text-align: center;
}

.wc-api-sync-quote-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

.wc-api-sync-quote-header .subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.wc-api-sync-form-section {
    margin-bottom: 30px;
}

.wc-api-sync-form-section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-api-sync-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wc-api-sync-form-row:last-child {
    margin-bottom: 0;
}

.wc-api-sync-form-group {
    display: flex;
    flex-direction: column;
}

.wc-api-sync-form-group label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.required {
    color: #e74c3c;
}

.wc-api-sync-form-control {
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.wc-api-sync-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wc-api-sync-form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

textarea.wc-api-sync-form-control {
    resize: vertical;
    min-height: 120px;
}

.wc-api-sync-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.button {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    flex: 1;
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.button-secondary {
    background: #f0f0f0;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    flex: 1;
}

.button-secondary:hover {
    background: #e0e0e0;
    border-color: #d0d0d0;
}

.button-large {
    padding: 14px 28px;
    font-size: 15px;
}

.button-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#quote-form-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

#quote-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#quote-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Form */
@media (max-width: 768px) {
    .wc-api-sync-quote-container {
        padding: 25px;
    }

    .wc-api-sync-quote-header h1 {
        font-size: 22px;
    }

    .wc-api-sync-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .wc-api-sync-form-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wc-api-sync-quote-page-wrapper {
        margin: 15px 0;
    }

    .wc-api-sync-quote-container {
        padding: 20px;
        border-radius: 8px;
    }

    .wc-api-sync-quote-header h1 {
        font-size: 18px;
    }

    .wc-api-sync-quote-header .subtitle {
        font-size: 12px;
    }

    .wc-api-sync-form-section h3 {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .wc-api-sync-form-group label {
        font-size: 12px;
    }

    .wc-api-sync-form-control {
        padding: 10px 12px;
        font-size: 13px;
    }

    .button {
        padding: 10px 16px;
        font-size: 13px;
    }

    .button-large {
        padding: 12px 20px;
    }
}
