/**
 * Cart UI Styles
 * Estilos para o novo design de carrinho com cards
 */

/* Cart header */
.cart-count {
    font-size: 0.85em;
    opacity: 0.7;
    font-weight: normal;
}

/* Empty cart state */
.empty-cart-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-cart-icon {
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-cart-state p {
    font-size: 18px;
    margin: 12px 0 8px;
    color: #666;
}

.empty-cart-state small {
    font-size: 14px;
    color: #999;
}

/* Cart items list */
.cart-items-list {
    margin-bottom: 20px;
}

/* Cart item card - COMPACTO */
.cart-item-card {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.cart-item-card:hover {
    border-color: #2196F3;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.08);
}

/* Remove button - MENOR */
.btn-remove-item {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 14px;
}

.btn-remove-item:hover {
    background: #fee;
    border-color: #f44336;
    color: #f44336;
    transform: scale(1.1);
}

.btn-remove-item:active {
    transform: scale(0.95);
}

.btn-remove-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badge de tipo */
.cart-item-header {
    margin-bottom: 8px;
}

.item-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-transfer {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-tour {
    background: #fff3e0;
    color: #f57c00;
}

/* Título do item - MENOR */
.cart-item-title {
    margin: 0 24px 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* Detalhes do item - COMPACTO */
.cart-item-details {
    margin-bottom: 10px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 13px;
    color: #666;
}

.detail-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

/* Preço do item - COMPACTO */
.cart-item-price-section {
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.item-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subtotal-label {
    font-size: 13px;
    color: #666;
}

.subtotal-value {
    font-size: 16px;
    color: #2196F3;
    font-weight: 700;
}

/* Ida-e-volta: valor de cada trecho */
.item-leg-prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}

.item-leg-price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: #444;
}

.item-leg-label small {
    margin-left: 4px;
    font-size: 11px;
    color: #888;
}

.item-leg-amount {
    font-weight: 600;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-item-card {
        padding: 12px;
    }

    .cart-item-title {
        font-size: 13px;
        margin-right: 22px;
    }

    .btn-remove-item {
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .detail-row {
        font-size: 12px;
    }

    .subtotal-value {
        font-size: 15px;
    }
}

/* Baggage Notice */
.baggage-notice {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

.baggage-notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.baggage-icon {
    font-size: 20px;
}

.baggage-notice-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.baggage-notice-content {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 16px;
}

.baggage-notice-content p {
    margin: 8px 0;
}

.baggage-notice-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.baggage-notice-content li {
    margin: 4px 0;
}

.baggage-warning {
    color: #d32f2f;
    font-weight: 500;
    margin-top: 12px;
}

/* Bagagem inclusa (gratuita) — bloco declaratório, não afeta o total */
.baggage-included {
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
    margin-top: 16px;
}

.baggage-included-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.baggage-included-subtitle {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
}

.baggage-included-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.baggage-included-label {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

/*
 * Estilo do contador. Espelha .counter/.counter-btn/.counter-value de
 * form-transfer.css, mas escrito aqui porque aquele arquivo só é carregado
 * quando o step de filtro aparece ($showFilterStep) — sem isto o contador fica
 * sem estilo na maioria das entradas do checkout.
 * A coluna do resumo é estreita: nada aqui pode encolher.
 */
.baggage-included .counter {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
}

.baggage-included .counter-btn {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.baggage-included .counter-value {
    flex: 0 0 auto;
    min-width: 28px;
    padding: 4px 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.baggage-included-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.baggage-included-dims {
    font-size: 12px;
    color: #777;
}

.baggage-included-separator {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #999;
    text-align: center;
    padding: 2px 0;
}

.baggage-included-separator-plus {
    font-size: 16px;
}

.baggage-included .counter-btn {
    background: #fff;
    color: #333;
    font-size: 15px;
    line-height: 1;
}

.baggage-included .counter-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #007bff;
}

.baggage-included .counter-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f1f1f1;
    border-color: #e0e0e0;
    color: #999;
}

.baggage-included .counter-btn:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.baggage-included-hint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #856404;
    min-height: 0;
}

.baggage-included-hint:empty {
    display: none;
}

@media (max-width: 400px) {
    .baggage-included-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .baggage-included-separator {
        text-align: left;
    }
}

.baggage-extra-option {
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
    margin-top: 16px;
}

.baggage-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.baggage-checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.baggage-checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #007bff;
    border-color: #007bff;
}

.baggage-checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.baggage-extra-info {
    margin-top: 12px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
}

.baggage-extra-price {
    margin: 0;
    font-size: 14px;
    color: #856404;
}

.baggage-extra-price strong {
    color: #d32f2f;
}

.baggage-extra-price small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.8;
}

/* Controles de bagagem extra */
.baggage-extra-controls {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.baggage-quantity-section {
    margin-bottom: 16px;
}

.baggage-quantity-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.quantity-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 150px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #333;
}

.quantity-btn:hover {
    background: #f5f5f5;
    border-color: #007bff;
}

.quantity-btn:active {
    background: #e0e0e0;
}

.baggage-quantity-input {
    flex: 1;
    width: 60px;
    height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    -moz-appearance: textfield;
}

.baggage-quantity-input::-webkit-outer-spin-button,
.baggage-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.baggage-quantity-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.baggage-confirmation-section {
    margin-top: 16px;
}

.baggage-confirmation-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    line-height: 1.5;
}

.baggage-confirmation-label input[type="checkbox"] {
    display: none;
}

.baggage-confirmation-label .checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.baggage-confirmation-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #28a745;
    border-color: #28a745;
}

.baggage-confirmation-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.baggage-confirmation-label .checkbox-text {
    font-size: 13px;
    color: #555;
    flex: 1;
}
/* ── + Adicionar outro serviço ─────────────────────────────────────────────── */
.btn-add-another-service {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-add-another-service:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.add-service-modal-content {
    max-width: 440px;
}

.add-service-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-service-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #111827;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.add-service-option:hover,
.add-service-option:focus-visible {
    border-color: #1e40af;
    background: #eff6ff;
}

.add-service-option-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.add-service-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.add-service-option-text strong {
    font-size: 15px;
}

.add-service-option-text small {
    font-size: 13px;
    color: #6b7280;
}

.add-service-option-arrow {
    font-size: 22px;
    color: #9ca3af;
    flex-shrink: 0;
}

button.add-service-option {
    width: 100%;
    background: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.add-service-back {
    align-self: flex-start;
    padding: 0;
    border: none;
    background: none;
    color: #1e40af;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.add-service-panel-title {
    margin: 0;
    font-size: 14px;
    color: #374151;
}
