/* Backup Product Selector Styles */
.backup-product-selector {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.backup-product-selector h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.backup-product-selector p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.backup-product-search-container {
    position: relative;
    margin-bottom: 15px;
}

.backup-product-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.backup-product-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.backup-product-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
}

.backup-product-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.backup-product-item:hover {
    background: #f8f9fa;
}

.backup-product-item:last-child {
    border-bottom: none;
}

.backup-product-item .product-image {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.backup-product-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.backup-product-item .product-info {
    flex: 1;
}

.backup-product-item .product-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.backup-product-item .product-price {
    font-size: 12px;
    color: #666;
}

.selected-backup-product {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.selected-backup-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-backup-image {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.selected-backup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-backup-info {
    flex: 1;
}

.selected-backup-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.selected-backup-price {
    font-size: 12px;
    color: #666;
}

.remove-backup {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-backup:hover {
    background: #c82333;
    transform: scale(1.1);
}

.search-loading,
.no-results,
.search-error {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.search-error {
    color: #dc3545;
}

/* Backup Confirmation Styles */
.backup-confirmation {
    margin: 15px 0;
    padding: 12px 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
    animation: slideIn 0.3s ease;
}

.backup-confirmation-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.backup-icon {
    font-size: 16px;
    font-weight: bold;
    color: #28a745;
}

.backup-text {
    font-size: 14px;
    line-height: 1.4;
}

.backup-text strong {
    font-weight: 600;
}

/* Tooltip Styles */
.backup-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.3;
    max-width: 250px;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: none;
}

.backup-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .backup-product-selector {
        margin: 15px 0;
        padding: 15px;
    }
    
    .backup-product-selector h4 {
        font-size: 15px;
    }
    
    .backup-product-selector p {
        font-size: 13px;
    }
    
    .backup-product-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .backup-confirmation {
        margin: 10px 0;
        padding: 10px 12px;
    }
    
    .backup-confirmation-content {
        gap: 8px;
    }
    
    .backup-text {
        font-size: 13px;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* WooCommerce Integration */
.woocommerce .backup-product-selector {
    margin: 20px 0;
}

.woocommerce .backup-product-select {
    font-family: inherit;
}

/* Theme Compatibility */
.theme-twenty-twenty-one .backup-product-selector,
.theme-twenty-twenty-two .backup-product-selector,
.theme-twenty-twenty-three .backup-product-selector {
    background: var(--wp--preset--color--background);
    border-color: var(--wp--preset--color--border);
}

.theme-twenty-twenty-one .backup-product-select,
.theme-twenty-twenty-two .backup-product-select,
.theme-twenty-twenty-three .backup-product-select {
    border-color: var(--wp--preset--color--border);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .backup-product-selector {
        border-width: 2px;
    }
    
    .backup-product-select {
        border-width: 2px;
    }
    
    .backup-confirmation {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .backup-product-select,
    .backup-confirmation {
        transition: none;
    }
    
    .backup-confirmation {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .backup-product-selector {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .backup-product-selector h4 {
        color: #f7fafc;
    }
    
    .backup-product-selector p {
        color: #a0aec0;
    }
    
    .backup-product-select {
        background: #4a5568;
        border-color: #718096;
        color: #f7fafc;
    }
    
    .backup-product-select:focus {
        border-color: #63b3ed;
        box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1);
    }
    
    .backup-confirmation {
        background: #2f855a;
        border-color: #38a169;
        color: #f0fff4;
    }
    
    .backup-icon {
        color: #68d391;
    }
}

/* Print Styles */
@media print {
    .backup-product-selector {
        display: none;
    }
} 