/* Supported Sites - Apple-Inspired Design */

.supported-sites-page {
    min-height: 100vh;
    background: #f5f5f7;
}

.hero-simple {
    background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%);
    border-bottom: 1px solid #d2d2d7;
}

/* URL Checker Card */
.url-checker-card {
    background: white;
    border: 1px solid #d2d2d7;
    border-radius: 18px;
    padding: 3rem 2rem;
    max-width: 48rem;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.checker-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.checker-subtitle {
    font-size: 1.125rem;
    color: #86868b;
    margin-bottom: 2rem;
}

/* Search Input */
.search-container {
    margin-top: 2rem;
}

/* Search Input */
.search-input-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    color: #86868b;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 1rem 3.5rem;
    border: 2px solid #d2d2d7;
    border-radius: 12px;
    font-size: 1.0625rem;
    background: #f5f5f7;
    transition: all 0.2s ease;
    outline: none;
}

.search-input:focus {
    border-color: #0071e3;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

/* Autocomplete Dropdown - Apple Style Enhanced */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.75rem;
    background: white;
    border: 1px solid #d2d2d7;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 50;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f7;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.autocomplete-item:first-child {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%);
    transform: translateX(4px);
}

.autocomplete-item:active {
    transform: translateX(2px) scale(0.98);
}

.autocomplete-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
    transition: all 0.2s ease;
}

.autocomplete-item:hover .autocomplete-icon,
.autocomplete-item.selected .autocomplete-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
}

.autocomplete-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.autocomplete-name {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-extractor {
    font-size: 0.8125rem;
    color: #86868b;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-count {
    font-size: 0.75rem;
    color: #86868b;
    padding: 0.75rem 1.5rem;
    text-align: center;
    border-top: 1px solid #f5f5f7;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    font-weight: 500;
}

/* Custom scrollbar for dropdown */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 4px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #b8b8bd;
}

.clear-button {
    position: absolute;
    right: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d2d2d7;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.clear-button:hover {
    background: #86868b;
}

/* Result Cards */
.result-card {
    margin-top: 1.5rem;
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-card {
    background: #f5f5f7;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.success-card {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.error-card {
    background: #ffebee;
    border: 2px solid #f44336;
}

.result-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.success-icon {
    background: #4caf50;
    color: white;
}

.error-icon {
    background: #f44336;
    color: white;
}

.result-icon svg {
    width: 24px;
    height: 24px;
}

.result-content {
    flex: 1;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.result-text {
    font-size: 1.0625rem;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.result-hint {
    font-size: 0.9375rem;
    color: #86868b;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0071e3;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 980px;
    font-weight: 500;
    margin-top: 1rem;
    transition: background 0.2s ease;
    text-decoration: none;
}

.download-button:hover {
    background: #0077ed;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #d2d2d7;
    border-top-color: #0071e3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Sites Section */
.sites-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #86868b;
}

.site-search {
    max-width: 48rem;
    margin: 0 auto 3rem;
}

.sites-loading {
    text-align: center;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Sites Grid */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.site-card {
    background: white;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.site-card:hover {
    border-color: #0071e3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.site-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.site-info {
    flex: 1;
    min-width: 0;
}

.site-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
}

.site-extractor {
    font-size: 0.875rem;
    color: #86868b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-button {
    background: white;
    border: 2px solid #0071e3;
    color: #0071e3;
    padding: 0.875rem 2rem;
    border-radius: 980px;
    font-weight: 500;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-button:hover {
    background: #0071e3;
    color: white;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #86868b;
    font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 768px) {
    .url-checker-card {
        padding: 2rem 1.5rem;
    }

    .checker-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .sites-grid {
        grid-template-columns: 1fr;
    }

    .result-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}
