/*!
* Relacional (rx.cart.css)
* Version: 1.0.0
* Build date: Sat Oct 04 2025
*
* Copyright (c) 2025 Relacional ALL RIGHTS RESERVED
*/

/* ================================
   Container Principal
   ================================ */
   .rx-cart {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
}

.rx-cart-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ================================
   Carrinho Vazio
   ================================ */
.rx-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.rx-cart-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.rx-cart-empty-message {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* ================================
   Item do Carrinho
   ================================ */
.rx-cart-item {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.rx-cart-item:hover {
    
}

.rx-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
}

/* ================================
   Informações do Item
   ================================ */
.rx-cart-item-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.rx-cart-item-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rx-cart-item-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.rx-cart-item-content {
    flex: 1;
    min-width: 0;
}

.rx-cart-item-title {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1f1f1f;
    line-height: 1.4;
}

.rx-cart-item-description {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    line-height: 1.4;
}

.rx-cart-item-schedule {
    display: flex;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1f1f1f;
    line-height: 1.4;
}

.rx-cart-item-responsible {
    display: flex;
    margin-top: 0px;
    font-size: 13px;
    font-weight: 500;
    color: #1f1f1f;
    line-height: 1.4;
}

.rx-cart-item-address {
    display: block;
    font-size: 13px;
    color: #888;
    line-height: 1.4;
    margin-top: 8px;
}

/* ================================
   Ações do Item
   ================================ */
.rx-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rx-cart-item-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rx-cart-item-price-content {
    text-align: right;
}

.rx-cart-item-installments {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f1f1f;
}

.rx-cart-item-total {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.rx-cart-item-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ================================
   Botões de Expansão
   ================================ */
   
.rx-cart-item-expand-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.rx-cart-item-expand-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.rx-cart-item-expand-desktop .rx-cart-expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    color: #666;    
  }

/* ================================
   Controles (Editar/Remover)
   ================================ */
.rx-cart-item-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rx-cart-btn-edit,
.rx-cart-btn-delete {
    display: flex;
    cursor: pointer;
    padding: 8px;
    align-items: center;
    justify-content: center;
}

.rx-cart-btn-edit i,
.rx-cart-btn-delete i {
    width: 20px;
    height: 20px;
    display: block;
}

.rx-cart-btn-delete i {
    color:  #ec1f24;
    font-size: 1.2rem;
}

.rx-cart-btn-edit i {
    color: #2d3192;
    font-size: 1.2rem;
}

/* ================================
   Detalhes do Item (Expandível)
   ================================ */
.rx-cart-item-details {
    border-top: 1px solid #e0e0e0;
    padding: 20px;
    background-color: #fafafa;
}

.rx-cart-item-details-content {
    color: #666;
    line-height: 1.4;
    text-align: justify;
}

.rx-cart-item-expired {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: #ffebee;
    color: #c62828;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ================================
   Modal
   ================================ */
.rx-cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rx-cart-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.rx-cart-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rx-cart-modal-body {
    padding: 32px;
    text-align: center;
}

.rx-cart-modal-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 400;
    color: #333;
    line-height: 1.4;
}

.rx-cart-modal-title span {
    font-size: 18px;
    font-weight: 600;
}

.rx-cart-modal-message {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.rx-cart-modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 32px 32px 32px;
}

.rx-cart-modal-cancel,
.rx-cart-modal-confirm {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.rx-cart-modal-cancel {
    background-color: #f5f5f5;
    color: #333;
}

.rx-cart-modal-cancel:hover {
    background-color: #e0e0e0;
}

.rx-cart-modal-confirm {
    background-color: #00a8e1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rx-cart-modal-confirm:hover {
    background-color: #0095ca;
}

.rx-cart-modal-confirm-delete {
    background-color: #d32f2f;
}

.rx-cart-modal-confirm-delete:hover {
    background-color: #c62828;
}

.descricao li,
.importante li {
    margin-bottom: 14px;
}

.restricoes {
    color: #404040;
    line-height: 1.6rem;
    list-style: disc;
    margin-left: 2.4rem;
    margin-bottom: 8px;
}

/* ================================
   Responsivo - Mobile
   ================================ */
@media (max-width: 768px) {
    .rx-cart-item-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .rx-cart-item-info {
        width: 100%;
        position: relative;
    }
    
    .rx-cart-item-expand-mobile {
        display: flex;
        position: absolute;
        right: 0;
        top: 0;
    }
    
    .rx-cart-item-expand-desktop {
        display: none;
    }
    
    .rx-cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .rx-cart-item-price-wrapper {
        order: -1;
        align-items: flex-start;
    }
    
    .rx-cart-item-price-content {
        text-align: left;
    }
    
    .rx-cart-item-buttons {
        order: 1;
    }
    
    .rx-cart-modal-content {
        max-width: 90%;
    }
    
    .rx-cart-modal-body {
        padding: 24px;
    }
    
    .rx-cart-modal-footer {
        flex-direction: column-reverse;
        padding: 0 24px 24px 24px;
    }
    
    .rx-cart-modal-cancel,
    .rx-cart-modal-confirm {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rx-cart-item-header {
        padding: 16px;
    }
    
    .rx-cart-item-icon {
        width: 50px;
        height: 50px;
    }
    
    .rx-cart-item-title {
        font-size: 14px;
    }
    
    .rx-cart-item-description {
        font-size: 13px;
    }
    
    .rx-cart-item-installments {
        font-size: 14px;
    }
    
    .rx-cart-item-total {
        font-size: 12px;
    }
    
    .rx-cart-item-details {
        padding: 16px;
    }
}

/* ================================
   Estados Adicionais
   ================================ */
.rx-cart-item-expanded .rx-cart-item-header {
    background-color: #fafafa;
}

.rx-cart-item.rx-cart-item-loading {
    opacity: 0.6;
    pointer-events: none;
}

.rx-cart-item.rx-cart-item-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ================================
   Utilitários
   ================================ */
.rx-cart-item-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.rx-cart-item-badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.rx-cart-item-badge-warning {
    background-color: #fff3e0;
    color: #f57c00;
}

.rx-cart-item-badge-error {
    background-color: #ffebee;
    color: #c62828;
}

.rx-cart-item-badge-info {
    background-color: #e3f2fd;
    color: #1976d2;
}