/**
 * Multi-Quote Styles
 * 
 * Classes com prefixo wsq-mq- para evitar conflito com modal.css
 * 
 * @package Dsantos\WooSmartQuotes
 * @since 1.1.0
 */

/* ==========================================================================
   Mini Cart Widget
   ========================================================================== */

.wsq-mini-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.wsq-mini-cart-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0073aa;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s;
}

.wsq-mini-cart-toggle:hover {
    transform: scale(1.1);
}

.wsq-mini-cart-icon {
    font-size: 24px;
}

.wsq-mini-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #d63638;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Dropdown */
.wsq-mini-cart-dropdown {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    max-height: 400px;
}

.wsq-mini-cart-dropdown.show {
    display: flex;
}

.wsq-mini-cart-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wsq-mini-cart-header h3 {
    margin: 0;
    font-size: 16px;
}

.wsq-mini-cart-header button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 13px;
}

.wsq-mini-cart-header button:hover {
    color: #d63638;
}

.wsq-mini-cart-empty {
    padding: 30px 15px;
    text-align: center;
    color: #666;
}

.wsq-mini-cart-list {
    padding: 10px;
    overflow-y: auto;
    max-height: 250px;
}

/* Item */
.wsq-mini-cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.wsq-mini-cart-item:last-child {
    border-bottom: none;
}

.wsq-mini-cart-item-image {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.wsq-mini-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wsq-mini-cart-item-info {
    flex: 1;
}

.wsq-mini-cart-item-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
}

.wsq-mini-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wsq-qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.wsq-qty-btn:hover {
    background: #eee;
}

.wsq-qty-input {
    width: 40px;
    height: 24px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.wsq-mini-cart-item-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.wsq-mini-cart-item-remove:hover {
    color: #d63638;
}

/* Footer */
.wsq-mini-cart-footer {
    padding: 15px;
    border-top: 1px solid #eee;
}

.wsq-mini-cart-footer .button {
    width: 100%;
    text-align: center;
}

/* Notice */
.wsq-notice {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #0073aa;
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.wsq-notice.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Multi-Quote Modal (wsq-mq- prefix to avoid conflicts)
   ========================================================================== */

.wsq-mq-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wsq-mq-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: wsq-mq-modal-in 0.3s ease;
}

@keyframes wsq-mq-modal-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wsq-mq-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f1;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wsq-mq-close:hover {
    background: #d63638;
    color: #fff;
}

.wsq-mq-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1d2327;
    font-size: 20px;
    padding-right: 40px;
}

.wsq-mq-products {
    margin-bottom: 20px;
    padding: 15px;
    background: #f6f7f7;
    border-radius: 8px;
    border: 1px solid #dcdcde;
}

.wsq-mq-products-count {
    margin: 0 0 10px 0;
    color: #50575e;
    font-size: 13px;
}

.wsq-mq-products .wsq-modal-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #dcdcde;
}

.wsq-mq-products .wsq-modal-product:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wsq-mq-products .wsq-modal-product:first-child {
    padding-top: 0;
}

.wsq-mq-products .wsq-modal-product img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dcdcde;
}

.wsq-mq-products .wsq-modal-product-info {
    flex: 1;
    min-width: 0;
}

.wsq-mq-products .wsq-modal-product-name {
    display: block;
    font-weight: 500;
    color: #1d2327;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wsq-mq-products .wsq-modal-product-qty {
    display: block;
    color: #50575e;
    font-size: 12px;
    margin-top: 2px;
}

/* Form */
.wsq-mq-modal form p {
    margin-bottom: 16px;
}

.wsq-mq-modal form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1d2327;
    font-size: 14px;
}

.wsq-mq-modal form input,
.wsq-mq-modal form select,
.wsq-mq-modal form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #8c8f94;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wsq-mq-modal form input:focus,
.wsq-mq-modal form select:focus,
.wsq-mq-modal form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.wsq-mq-modal form input::placeholder,
.wsq-mq-modal form textarea::placeholder {
    color: #a7aaad;
}

.wsq-mq-modal form textarea {
    resize: vertical;
    min-height: 80px;
}

.wsq-mq-submit {
    margin-top: 24px !important;
}

.wsq-mq-modal form .button,
.wsq-mq-modal form .button-primary {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #0073aa;
    color: #fff;
}

.wsq-mq-modal form .button:hover,
.wsq-mq-modal form .button-primary:hover {
    background: #005a87;
}

.wsq-mq-modal form .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wsq-mq-company-field {
    animation: wsq-mq-slide-down 0.2s ease;
}

@keyframes wsq-mq-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.wsq-add-to-quote-btn {
    display: inline-block;
    margin-top: 10px;
}

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

@media (max-width: 768px) {
    .wsq-mini-cart-dropdown {
        width: 280px;
    }
    
    .wsq-mq-modal {
        padding: 20px;
    }
}