/**
 * Additional Services - Frontend (Checkout)
 * 
 * Styles for order addons on checkout page
 */

/* Additional Services Items */
.addon-item-row {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.addon-item-row:last-of-type {
    border-bottom: none;
}

.addon-content-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.addon-info-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-height: none;
    overflow: hidden;
}

.addon-content-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.addon-thumbnail {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.addon-title-label {
    font-size: 14px;
    font-weight: 500;
    color: #171717;
    line-height: 1.3;
}

.addon-desc-label {
    font-size: 12px;
    color: #888;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.addon-price-label {
    font-size: 14px;
    font-weight: 600;
    color: #171717;
}

/* Toggle Switch (identical to admin panel) */
.addon-switch-label {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    margin: 0;
    cursor: pointer;
}

.addon-checkbox-toggle {
    opacity: 0;
    width: 0;
    height: 0;
}

.addon-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d7d7d7;
    border-radius: 22px;
    transition: .2s;
}

.addon-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.10);
}

.addon-checkbox-toggle:checked + .addon-switch-slider {
    background: #23c720;
}

.addon-checkbox-toggle:checked + .addon-switch-slider:before {
    transform: translateX(22px);
}

.addon-checkbox-toggle:disabled + .addon-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading state */
.addon-item-row.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Total row */
.addon-total-row {
    font-weight: 600;
    margin-top: 4px;
}

.addon-total-amount {
    color: #23c720;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .addon-thumbnail {
        width: 36px;
        height: 36px;
    }
    
    .addon-title-label {
        font-size: 13px;
    }
    
    .addon-price-label {
        font-size: 13px;
    }
}

.addon-item-row:last-of-type {
    border-bottom: none;
}

.addon-content-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.addon-info-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-height: none;
    overflow: hidden;
}

.addon-content-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.addon-thumbnail {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.addon-title-label {
    font-size: 14px;
    font-weight: 500;
    color: #171717;
    line-height: 1.3;
}

.addon-desc-label {
    font-size: 12px;
    color: #888;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.addon-price-label {
    font-size: 14px;
    font-weight: 600;
    color: #171717;
}

/* Toggle Switch (identical to admin panel) */
.addon-switch-label {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    margin: 0;
    cursor: pointer;
}

.addon-checkbox-toggle {
    opacity: 0;
    width: 0;
    height: 0;
}

.addon-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d7d7d7;
    border-radius: 22px;
    transition: .2s;
}

.addon-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.10);
}

.addon-checkbox-toggle:checked + .addon-switch-slider {
    background: #23c720;
}

.addon-checkbox-toggle:checked + .addon-switch-slider:before {
    transform: translateX(22px);
}

.addon-checkbox-toggle:disabled + .addon-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading state */
.addon-item-row.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Total row */
.addon-total-row {
    font-weight: 600;
    margin-top: 4px;
}

.addon-total-amount {
    color: #23c720;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .addon-thumbnail {
        width: 36px;
        height: 36px;
    }
    
    .addon-title-label {
        font-size: 13px;
    }
    
    .addon-price-label {
        font-size: 13px;
    }
}

.addon-item-row:last-of-type {
    border-bottom: none;
}

.addon-content-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.addon-info-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-height: none;
    overflow: hidden;
}

.addon-content-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.addon-thumbnail {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.addon-title-label {
    font-size: 14px;
    font-weight: 500;
    color: #171717;
    line-height: 1.3;
}

.addon-desc-label {
    font-size: 12px;
    color: #888;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.addon-price-label {
    font-size: 14px;
    font-weight: 600;
    color: #171717;
}

/* Toggle Switch (identical to admin panel) */
.addon-switch-label {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    margin: 0;
    cursor: pointer;
}

.addon-checkbox-toggle {
    opacity: 0;
    width: 0;
    height: 0;
}

.addon-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d7d7d7;
    border-radius: 22px;
    transition: .2s;
}

.addon-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.10);
}

.addon-checkbox-toggle:checked + .addon-switch-slider {
    background: #23c720;
}

.addon-checkbox-toggle:checked + .addon-switch-slider:before {
    transform: translateX(22px);
}

.addon-checkbox-toggle:disabled + .addon-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading state */
.addon-item-row.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Total row */
.addon-total-row {
    font-weight: 600;
    margin-top: 4px;
}

.addon-total-amount {
    color: #23c720;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .addon-thumbnail {
        width: 36px;
        height: 36px;
    }
    
    .addon-title-label {
        font-size: 13px;
    }
    
    .addon-price-label {
        font-size: 13px;
    }
}

/* Placeholder - will reuse existing toggle styles from frida-child/style.css:
   - .sp-toggle
   - .shipping-protection__label
   - .shipping-protection__toggle
   - .order-item
*/

