/* TKA WooCommerce Extra Fees - Frontend Styles */

.tka-extra-fees-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.tka-extra-fees-display h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.tka-fees-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tka-fee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.tka-fee-item:last-child {
    border-bottom: none;
}

.tka-fee-name {
    font-weight: 500;
    color: #333;
}

.tka-fee-amount {
    font-weight: 600;
    color: #28a745;
}

/* Applied Fees on Cart Page */
.tka-applied-fees {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.tka-applied-fees h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.tka-applied-fees-list {
    margin-top: 15px;
}

.tka-applied-fee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.tka-applied-fee-item:last-child {
    border-bottom: none;
}

.tka-applied-fee-item .tka-fee-name {
    font-weight: 500;
    color: #333;
}

.tka-applied-fee-item .tka-fee-amount {
    font-weight: 600;
    color: #28a745;
    font-size: 16px;
}

/* Fee Display Styles */
.tka-fee-display-minimal {
    background: transparent;
    border: none;
    padding: 10px 0;
}

.tka-fee-display-minimal .tka-fee-item {
    padding: 5px 0;
    border-bottom: 1px dotted #ccc;
}

.tka-fee-display-detailed {
    background: #fff;
    border: 2px solid #007cba;
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tka-fee-display-detailed h3 {
    color: #007cba;
    font-size: 18px;
    margin-bottom: 20px;
}

.tka-fee-display-detailed .tka-fee-item {
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.tka-fee-display-detailed .tka-fee-name {
    font-size: 14px;
}

.tka-fee-display-detailed .tka-fee-amount {
    font-size: 16px;
    font-weight: 700;
}

/* Loading States */
.tka-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.tka-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: tka-spin 1s linear infinite;
}

@keyframes tka-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.tka-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: 500;
}

.tka-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tka-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tka-extra-fees-display,
    .tka-applied-fees {
        padding: 15px;
        margin: 15px 0;
    }
    
    .tka-fee-item,
    .tka-applied-fee-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Integration with WooCommerce Styles */
.woocommerce .tka-extra-fees-display {
    margin: 20px 0;
}

.woocommerce-cart .tka-applied-fees {
    margin: 20px 0;
}

.woocommerce-cart .tka-applied-fees h3 {
    color: #333;
}

/* Theme Compatibility */
.theme-twenty-twenty-one .tka-extra-fees-display,
.theme-twenty-twenty-two .tka-extra-fees-display,
.theme-twenty-twenty-three .tka-extra-fees-display {
    background: var(--global--color-background);
    border-color: var(--global--color-border);
    color: var(--global--color-foreground);
}

.theme-twenty-twenty-one .tka-applied-fees,
.theme-twenty-twenty-two .tka-applied-fees,
.theme-twenty-twenty-three .tka-applied-fees {
    background: var(--global--color-background);
    border-color: var(--global--color-border);
    color: var(--global--color-foreground);
}
