/* Контейнер для ссылок */
.storage__links-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 20px;
}

/* Карточка ссылки */
.link-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: grab;
    transition: opacity 0.3s ease;
    text-decoration: none;
    user-select: none;
    width: 80px;
    z-index: 1;
}

/* Контейнер для иконки (для позиционирования кнопки настроек) */
.link-card__icon-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
}

.link-card:active {
    cursor: grabbing;
}

.link-card.dragging {
    opacity: 0.7;
    cursor: grabbing;
    z-index: 100;
    pointer-events: none;
}

.link-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.6s ease;
}

.link-card__icon:hover {
      transform: scale(1.05);
}

.link-card__default-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.6s ease;
}

.link-card__default-icon:hover {
  transform: scale(1.05);
}

/* Подсказки иконок */

.link-card__tooltip {
    position: absolute;
    bottom: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.842);
    color: #000000;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    white-space: normal;
    max-width: 250px;
    max-height: 200px;
    min-width: fit-content;
    min-height: fit-content;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.link-card__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.link-card:hover .link-card__tooltip {
    opacity: 1;
}

.link-card__tooltip-description {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: 8px;
    overflow-y: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 222px;
    white-space: normal;
}

.link-card__tooltip-url {
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 6px;
    margin-top: auto;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Кнопка настроек (шестеренка) */
.link-card__settings-btn {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 20px;
    height: 20px;
    background-color: var(--orange-icon);
    border: none;
    border-radius: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.6s ease;
    z-index: 10;
    padding: 0;
}

.link-card:hover .link-card__settings-btn {
    opacity: 1;
}

.link-card__settings-btn:hover {
    transform: rotate(90deg);
}

.link-card__settings-btn svg {
    width: 12px;
    height: 12px;
    color: #ffffff;
}

/* URL метка внизу иконки */
.link-card__url-label {
    position: absolute;
    bottom: -15px;
    left: 0;
    right: -10px;
    background-color: rgba(255, 255, 255, 0.017);
    color: #000000;
    font-size: 10px;
    padding: 0px 3px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 0 0 8px 8px;
    display: none;
    z-index: 5;
    pointer-events: none;
}
