/* ---------------------------------------------------------------------------
 * Psyciencia Rolodex
 * Paleta: navy #213A49 / gold #c9a84c / Playfair Display
 * --------------------------------------------------------------------------- */

.psy-rolodex {
    --psy-navy: #213A49;
    --psy-gold: #c9a84c;
    --psy-text: #333333;
    --psy-muted: #6b6b6b;
    --psy-border: #e8e6e0;
    --psy-divider: #f0eee8;
    --psy-bg: #ffffff;

    background: var(--psy-bg);
    border: 1px solid var(--psy-border);
    border-radius: 8px;
    padding: 28px 32px;
    margin: 2.5rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    box-sizing: border-box;
}

.psy-rolodex *,
.psy-rolodex *::before,
.psy-rolodex *::after {
    box-sizing: border-box;
}

/* Cabecera */
.psy-rolodex__head {
    margin-bottom: 4px;
}

.psy-rolodex__title {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--psy-navy);
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.psy-rolodex__desc {
    font-size: 14px;
    color: var(--psy-muted);
    margin: 0;
    line-height: 1.5;
}

/* Línea decorativa con acento dorado */
.psy-rolodex__rule {
    height: 1px;
    background: linear-gradient(to right, var(--psy-gold) 0%, var(--psy-gold) 48px, var(--psy-border) 48px);
    margin: 18px 0 16px;
}

/* Lista */
.psy-rolodex__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.psy-rolodex__item {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--psy-divider);
}

.psy-rolodex__item:last-child {
    border-bottom: none;
}

.psy-rolodex__link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none !important;
    color: inherit !important;
    transition: opacity 0.15s ease;
}

.psy-rolodex__link:hover {
    opacity: 0.75;
}

/* Icono / favicon */
.psy-rolodex__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    overflow: hidden;
}

.psy-rolodex__favicon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.psy-rolodex__initial {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* Cuerpo */
.psy-rolodex__body {
    flex: 1;
    min-width: 0;
    display: block;
}

.psy-rolodex__nameline {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.psy-rolodex__name {
    font-weight: 700;
    color: var(--psy-navy);
    font-size: 15px;
    line-height: 1.3;
}

.psy-rolodex__host {
    color: #8a8a8a;
    font-size: 13px;
    line-height: 1.3;
}

.psy-rolodex__description {
    display: block;
    margin-top: 3px;
    font-size: 13.5px;
    color: var(--psy-text);
    line-height: 1.45;
}

/* Pie */
.psy-rolodex__foot {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--psy-border);
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.psy-rolodex__refresh {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--psy-gold);
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.15s ease;
}

.psy-rolodex__refresh:hover {
    opacity: 0.7;
}

.psy-rolodex__refresh:disabled {
    opacity: 0.4;
    cursor: wait;
}

.psy-rolodex__refresh-icon {
    display: inline-block;
    transition: transform 0.5s ease;
    font-size: 15px;
}

.psy-rolodex.is-loading .psy-rolodex__refresh-icon {
    transform: rotate(360deg);
}

.psy-rolodex__all {
    font-size: 13px;
    color: var(--psy-muted) !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.psy-rolodex__all:hover {
    color: var(--psy-navy) !important;
}

/* Animación al refrescar */
.psy-rolodex.is-loading .psy-rolodex__list {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.psy-rolodex__list {
    transition: opacity 0.3s ease;
}

/* Responsive */
@media (max-width: 600px) {
    .psy-rolodex {
        padding: 22px 20px;
    }
    .psy-rolodex__title {
        font-size: 22px;
    }
    .psy-rolodex__nameline {
        gap: 8px;
    }
}
