/* Links Widget Styles */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: var(--bs-tertiary-bg);
    border-radius: 12px;
    text-decoration: none !important;
    color: var(--bs-body-color);
    transition: all 0.2s ease;
    border: 1px solid var(--bs-border-color);
    position: relative;
}

.link-item:hover {
    transform: translateY(-3px);
    background: var(--bs-tertiary-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.link-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-body-bg);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 1.25rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dark-mode .link-icon-wrapper {
    background: var(--bs-body-bg);
}

.link-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-delete-btn,
.link-edit-indicator {
    position: absolute;
    width: 22px;
    height: 22px;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.link-delete-btn {
    top: -8px;
    right: -8px;
    background: #ef4444;
}

.link-edit-indicator {
    top: -8px;
    left: -8px;
    background: #3b82f6;
    pointer-events: none;
}

.dashboard-edit-mode .link-delete-btn,
.dashboard-edit-mode .link-edit-indicator {
    display: flex;
}

.add-link-placeholder {
    border: 2px dashed var(--widget-border);
    background: transparent;
    cursor: pointer;
}

.add-link-placeholder:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}