/* Custom CSS styles for Sellez application */

/* Platform tabs styling */
.platform-tab {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: inline-block;
}

.platform-tab.active {
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

.platform-tab.amazon {
    background-color: #f3f4f6;
    color: #374151;
}

.platform-tab.amazon:hover {
    background-color: #fef3c7;
}

.platform-tab.amazon.active {
    background-color: #eab308;
}

.platform-tab.ebay {
    background-color: #f3f4f6;
    color: #374151;
}

.platform-tab.ebay:hover {
    background-color: #fef2f2;
}

.platform-tab.ebay.active {
    background-color: #dc2626;
}

.platform-tab.etsy {
    background-color: #f3f4f6;
    color: #374151;
}

.platform-tab.etsy:hover {
    background-color: #fff7ed;
}

.platform-tab.etsy.active {
    background-color: #f97316;
}

/* Product card styling */
.product-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease-in-out;
    transform: translateY(0);
}

.product-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-0.25rem);
}

/* Favorite button */
.favorite-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.favorite-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

.favorite-btn.favorited {
    color: #ef4444;
}

.favorite-btn:not(.favorited) {
    color: #9ca3af;
}

.favorite-btn:not(.favorited):hover {
    color: #ef4444;
}

/* Price styling */
.price-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.supplier-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.retail-price {
    font-size: 1.125rem;
    color: #6b7280;
    text-decoration: line-through;
}

.profit-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #dcfce7;
    color: #166534;
}

/* Loading spinner */
.loading-spinner {
    animation: spin 1s linear infinite;
    width: 1rem;
    height: 1rem;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: #10b981;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    z-index: 50;
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast.error {
    background-color: #ef4444;
}

.toast.info {
    background-color: #3b82f6;
}

/* Sidebar navigation */
.sidebar-nav {
    width: 16rem;
    background-color: #111827;
    color: white;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #d1d5db;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-item:hover {
    background-color: #1f2937;
    color: white;
}

.nav-item.active {
    background-color: #2563eb;
    color: white;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    background-color: #ef4444;
    border-radius: 9999px;
}

/* Animations */
@keyframes pulse-border {
    0%, 100% {
        border-color: #3b82f6;
    }
    50% {
        border-color: #1d4ed8;
    }
}

.matching-animation {
    animation: pulse-border 1.5s ease-in-out infinite;
    border: 2px solid #3b82f6;
}

@keyframes library-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes library-glow {
    0% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
    35% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.25); }
    100% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
}

.library-pop {
    animation: library-pop 0.35s ease-out;
}

.library-glow {
    animation: library-glow 0.8s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar-nav {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .sidebar-nav.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 30;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 769px) {
    .main-content {
        margin-left: 16rem;
    }

    .sidebar-overlay {
        display: none;
    }
}

/* Utility classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Form styling */
select, input[type="text"], input[type="email"], input[type="password"] {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

select:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button styling */
button {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
