/**
 * WCN Shipping Insurance Styles
 */

.cart_totals tr.fee:not(.wcn-insurance-row) {
    display: none!important;
}

/* Insurance row - single row with title, description, checkbox, and amount */
.wcn-insurance-row th {
    vertical-align: top !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.wcn-insurance-row td {
    vertical-align: top !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.wcn-insurance-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.wcn-insurance-description {
    font-size: 12px;
    font-weight: normal;
    color: #666;
    line-height: 1.5;
}

.wcn-insurance-opt-out {
    max-width: 425px;
    background: #dedede;
    padding: 10px 12px;
    border-radius: 4px;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

.wcn-insurance-opt-out:hover {
    background: #ffffff !important;
}

.wcn-insurance-opt-out label {
    margin: 0;
    font-weight: normal;
    user-select: none;
    display: flex;
    align-items:
    flex-start;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.5;
}

.wcn-insurance-opt-out input[type="checkbox"] {
    cursor: pointer;
}

.wcn-insurance-opt-out strong {
    font-weight: 600;
    font-size: 14px;
}

.wcn-insurance-opt-out em {
    font-style: normal;
    font-size: 12px;
    display: block;
    margin-top: 3px;
}

/* Order details page */
.wcn-insurance-order-info {
    border: 1px solid #e0e0e0;
}

.wcn-insurance-order-info h2 {
    font-size: 18px;
    color: #333;
}

/* Responsive styles */
@media (max-width: 768px) {
    .wcn-insurance-title {
        font-size: 13px;
    }
    
    .wcn-insurance-description {
        font-size: 11px;
    }
    
    .wcn-insurance-opt-out {
        padding: 8px 10px !important;
    }
    
    .wcn-insurance-opt-out label {
        font-size: 11px !important;
    }
    
    .wcn-insurance-opt-out strong {
        font-size: 11px;
    }
    
    .wcn-insurance-opt-out em {
        font-size: 10px !important;
    }
    
    .wcn-insurance-opt-out input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
    }
}

/* Loading state */
form.checkout.processing .wcn-insurance-row {
    opacity: 0.6;
}

/* Better checkbox styling */
.woocommerce-checkout-review-order-table tr.fee:not(.wcn-insurance-row) {
    display: none!important;
}

.wcn-insurance-opt-out input[type="checkbox"]:focus {
    outline: 2px solid #ffc107;
    outline-offset: 2px;
}
