/**
 * QuoteKit Frontend Styles
 * File: assets/css/frontend.css
 */

/* ==========================================================================
   Add to Quote Button
   ========================================================================== */

.quotekit-add-to-quote {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.quotekit-add-to-quote:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.quotekit-add-to-quote.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.quotekit-add-to-quote.in-quote {
    background: #46b450;
}

.quotekit-add-to-quote.in-quote:hover {
    background: #3a9644;
}

.quotekit-button-icon svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Header Icon
   ========================================================================== */

.quotekit-header-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.quotekit-icon-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.quotekit-icon-link:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.quotekit-count {
    position: absolute;
    top: -5px;
    right: -5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #e74c3c;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 10px;
}

/* ==========================================================================
   Quote List
   ========================================================================== */

.quotekit-list-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.quotekit-empty-list {
    text-align: center;
    padding: 60px 20px;
}

.quotekit-empty-list svg {
    color: #ccc;
    margin-bottom: 20px;
}

.quotekit-empty-list h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.quotekit-empty-list p {
    color: #666;
    margin-bottom: 30px;
}

.quotekit-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.quotekit-list-header h2 {
    margin: 0;
    font-size: 28px;
}

.quotekit-list-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.quotekit-list-table thead {
    background: #f5f5f5;
}

.quotekit-list-table th,
.quotekit-list-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.quotekit-list-table th {
    font-weight: 600;
    color: #333;
}

.quotekit-list-table tbody tr:last-child td {
    border-bottom: none;
}

.quotekit-list-table tbody tr:hover {
    background: #f9f9f9;
}

.product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.product-name a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.product-name a:hover {
    text-decoration: underline;
}

.variation-info {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-minus,
.qty-plus {
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    font-weight: bold;
}

.qty-minus:hover,
.qty-plus:hover {
    background: #e0e0e0;
}

.qty-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-item:hover {
    background: #fee;
}

.remove-item svg {
    display: block;
}

.quotekit-list-actions {
    margin-top: 30px;
    text-align: right;
}

/* ==========================================================================
   Quote Form
   ========================================================================== */

.quotekit-form-wrapper {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quotekit-form-header {
    margin-bottom: 30px;
}

.quotekit-form-header h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.quotekit-form-header p {
    color: #666;
    margin: 0;
}

.quotekit-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.quotekit-form-field {
    margin-bottom: 20px;
}

.quotekit-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.quotekit-form-field .required {
    color: #e74c3c;
}

.quotekit-form input[type="text"],
.quotekit-form input[type="email"],
.quotekit-form input[type="tel"],
.quotekit-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.quotekit-form input:focus,
.quotekit-form textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.quotekit-form textarea {
    resize: vertical;
    font-family: inherit;
}

.quotekit-form-notice {
    padding: 15px;
    background: #e7f7ff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.quotekit-form-notice p {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #0073aa;
}

.quotekit-form-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.quotekit-form-actions {
    text-align: right;
}

.quotekit-submit-button {
    padding: 14px 32px;
    background: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quotekit-submit-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.quotekit-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.quotekit-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.quotekit-form-message.visible {
    display: block !important;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

/* ==========================================================================
   Branding
   ========================================================================== */

.quotekit-branding {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.quotekit-branding p {
    margin: 0;
    font-size: 13px;
    color: #999;
}

.quotekit-branding a {
    color: #0073aa;
    text-decoration: none;
}

.quotekit-branding a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Messages/Notifications
   ========================================================================== */

.quotekit-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.quotekit-message.show {
    transform: translateX(0);
}

.quotekit-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.quotekit-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .quotekit-list-table {
        font-size: 14px;
    }
    
    .quotekit-list-table th,
    .quotekit-list-table td {
        padding: 12px 8px;
    }
    
    .product-thumbnail img {
        width: 60px;
        height: 60px;
    }
    
    .quotekit-form-row {
        grid-template-columns: 1fr;
    }
    
    .quotekit-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}