/* Crypto Logo Viewer - Tool.css */

/* Crypto Grid */
.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .crypto-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
}

@media (min-width: 768px) {
    .crypto-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

/* Crypto Card */
.crypto-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.crypto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .crypto-card:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Logo Wrapper */
.crypto-logo-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    background: var(--bs-secondary-bg);
    border-radius: 0.25rem;
    position: relative;
    overflow: hidden;
}

/* Loading placeholder animation */
.crypto-logo-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 1.5s infinite;
    transform: translateX(-100%);
}

[data-bs-theme="dark"] .crypto-logo-wrapper::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.crypto-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    position: relative;
}

.crypto-logo.loaded {
    opacity: 1;
}

/* Crypto Name */
.crypto-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-body-color);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.2em;
}

/* Crypto Symbol */
.crypto-symbol {
    font-size: 0.6875rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
    font-family: 'Courier New', monospace;
    background: var(--bs-secondary-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
}

/* Search Input Group */
.input-group-text {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

.input-group-text svg {
    width: 18px;
    height: 18px;
    fill: var(--bs-secondary-color);
}

#searchInput {
    border-left: none;
}

#searchInput:focus {
    border-color: var(--bs-primary);
    box-shadow: none;
}

#searchInput:focus + .input-group-text {
    border-color: var(--bs-primary);
}

/* Clear Search Button */
#clearSearchBtn svg {
    width: 16px;
    height: 16px;
}

/* Crypto Count */
#cryptoCount {
    font-size: 0.875rem;
}

#filteredCount {
    font-weight: 600;
    color: var(--bs-primary);
}

/* Modal Adjustments */
#modalImage {
    max-width: 100%;
    height: auto;
    background: var(--bs-secondary-bg);
    padding: 2rem;
    border-radius: 0.5rem;
}

#imageUrl {
    word-break: break-all;
    display: block;
    padding: 0.5rem;
    background: var(--bs-secondary-bg);
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
}

/* Loading State */
#loadingState .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* No Results */
#noResults svg {
    width: 48px;
    height: 48px;
    fill: var(--bs-secondary-color);
    opacity: 0.5;
}

/* Button Icons */
.btn.fsvg svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

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

.crypto-card {
    animation: fadeIn 0.3s ease;
}
