/* Custom styles for SEO Tools */

/* Body */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
}

.dropdown-item:active {
    background-color: var(--bs-gray-800);
}

/* Main content */
main {
    flex: 1;
}

/* Cards */
.card {
    margin-bottom: 1.5rem;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    font-weight: 600;
}

.tool-card {
    height: 100%;
}

.tool-card .card-img-top {
    height: 160px;
    object-fit: cover;
}

.tool-card .card-icon {
    font-size: 4rem;
    color: var(--bs-primary);
}

/* Score indicators */
.score-card {
    text-align: center;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.score-title {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.score-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Score colors */
.score-excellent {
    background-color: rgba(var(--bs-success-rgb), 0.2);
    color: var(--bs-success);
}

.score-good {
    background-color: rgba(var(--bs-info-rgb), 0.2);
    color: var(--bs-info);
}

.score-average {
    background-color: rgba(var(--bs-warning-rgb), 0.2);
    color: var(--bs-warning);
}

.score-poor {
    background-color: rgba(var(--bs-danger-rgb), 0.2);
    color: var(--bs-danger);
}

/* Loading spinner */
.loading-container {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* Results */
.result-section {
    margin-bottom: 2rem;
}

.result-summary {
    padding: 1.5rem;
    border-radius: 0.5rem;
    background-color: rgba(var(--bs-secondary-rgb), 0.1);
}

/* API Settings */
.api-key-form .form-group {
    margin-bottom: 1.5rem;
}

.api-key-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.api-key-item .badge {
    margin-left: 0.5rem;
}

/* Animation for placeholders and loading */
.placeholder-glow .placeholder {
    animation: placeholder-glow 2s ease-in-out infinite;
}

@keyframes placeholder-glow {
    50% {
        opacity: 0.2;
    }
}

/* Custom tooltip */
.custom-tooltip {
    position: relative;
    display: inline-block;
}

.custom-tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--bs-dark);
    color: var(--bs-light);
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.custom-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Media queries */
@media (max-width: 768px) {
    .card-deck .card {
        margin-bottom: 1rem;
    }
}
/* Selettore lingua nella navbar */
.lang-switch .dropdown-menu {
    min-width: 9rem;
}

.lang-switch .lang-code {
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Collapse dettagli problemi rilevati (SEO Analyzer) */
.issue-toggle {
    cursor: pointer;
}

.issue-toggle .issue-chevron {
    transition: transform 0.2s ease;
}

.issue-toggle[aria-expanded="true"] .issue-chevron {
    transform: rotate(180deg);
}

/* Elenco dettaglio problemi SEO Analyzer (dentro il collapse) */
.issue-detail-list li {
    word-break: break-all;
    padding: 0.15rem 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.08);
}

.issue-detail-list li:last-child {
    border-bottom: none;
}

.issue-detail-list li::before {
    content: "\2022";
    margin-right: 0.4rem;
    color: var(--bs-secondary-color, #888);
}
